mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-10-28 12:16:48 +08:00
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:
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user