mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
refactoring of user session counters
Fixes #792 Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -457,8 +457,12 @@ func (c *Connection) handleSFTPUploadToExistingFile(fs vfs.Fs, pflags sftp.FileO
|
||||
return t, nil
|
||||
}
|
||||
|
||||
// Disconnect disconnects the client closing the network connection
|
||||
// Disconnect disconnects the client by closing the channel
|
||||
func (c *Connection) Disconnect() error {
|
||||
if c.channel == nil {
|
||||
c.Log(logger.LevelWarn, "cannot disconnect a nil channel")
|
||||
return nil
|
||||
}
|
||||
return c.channel.Close()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user