forked from TrueCloudLab/rclone
serve sftp: fix spurious debugs on server close
This commit is contained in:
parent
84b5da089e
commit
62b769a0a7
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue