mirror of
https://github.com/rclone/rclone.git
synced 2024-12-23 15:38:57 +01:00
serve sftp: fix spurious debugs on server close
This commit is contained in:
parent
84b5da089e
commit
62b769a0a7
@ -167,7 +167,7 @@ func (c *conn) handleChannel(newChannel ssh.NewChannel) {
|
||||
}
|
||||
defer func() {
|
||||
err := channel.Close()
|
||||
if err != nil {
|
||||
if err != nil && err != io.EOF {
|
||||
fs.Debugf(c.what, "Failed to close channel: %v", err)
|
||||
}
|
||||
}()
|
||||
@ -218,7 +218,7 @@ func (c *conn) handleChannel(newChannel ssh.NewChannel) {
|
||||
server := sftp.NewRequestServer(channel, c.handlers)
|
||||
defer func() {
|
||||
err := server.Close()
|
||||
if err != nil {
|
||||
if err != nil && err != io.EOF {
|
||||
fs.Debugf(c.what, "Failed to close server: %v", err)
|
||||
}
|
||||
}()
|
||||
|
Loading…
Reference in New Issue
Block a user