fix (sftp): azure connection timeout

Azure SFTP only hold the connection for 2 minutes .... So we got to
flush our cache before it occurs, otherwise we end up with a "Connection lost" error
This commit is contained in:
MickaelK
2024-09-20 22:55:50 +10:00
parent 1a890479d3
commit f8956178d8

View File

@ -24,7 +24,7 @@ type Sftp struct {
func init() {
Backend.Register("sftp", Sftp{})
SftpCache = NewAppCache()
SftpCache = NewAppCache(1, 1)
SftpCache.OnEvict(func(key string, value interface{}) {
c := value.(*Sftp)
if c == nil {