mirror of
https://github.com/rclone/rclone.git
synced 2024-11-25 04:53:23 +08:00
sftp: ignore errors when closing the connection pool
There is no need to report errors when draining the connection pool - they are useless at this point. See: https://forum.rclone.org/t/rclone-fails-to-close-unused-tcp-connections-due-to-use-of-closed-network-connection/46735
This commit is contained in:
parent
27267547b9
commit
6e853c82d8
|
@ -815,13 +815,13 @@ func (f *Fs) drainPool(ctx context.Context) (err error) {
|
||||||
if cErr := c.closed(); cErr == nil {
|
if cErr := c.closed(); cErr == nil {
|
||||||
cErr = c.close()
|
cErr = c.close()
|
||||||
if cErr != nil {
|
if cErr != nil {
|
||||||
err = cErr
|
fs.Debugf(f, "Ignoring error closing connection: %v", cErr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
f.pool[i] = nil
|
f.pool[i] = nil
|
||||||
}
|
}
|
||||||
f.pool = nil
|
f.pool = nil
|
||||||
return err
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewFs creates a new Fs object from the name and root. It connects to
|
// NewFs creates a new Fs object from the name and root. It connects to
|
||||||
|
|
Loading…
Reference in New Issue
Block a user