refactoring of user session counters

Fixes #792

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2022-04-14 19:07:41 +02:00
parent 5bc0f4f8af
commit 002a06629e
28 changed files with 542 additions and 199 deletions

View File

@@ -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()
}