mirror of
https://github.com/drakkan/sftpgo.git
synced 2026-03-14 14:25:52 +01:00
ftpd: avoid fresh ftp connection being closed
This commit is contained in:
parent
139fa7120e
commit
d3d54d7948
1 changed files with 1 additions and 1 deletions
|
|
@ -1161,7 +1161,7 @@ func (conns *ActiveConnections) checkIdles() {
|
|||
logger.Debug(conn.GetProtocol(), conn.GetID(), "close idle connection, idle time: %s, username: %q close err: %v",
|
||||
time.Since(conn.GetLastActivity()), conn.GetUsername(), err)
|
||||
}(c)
|
||||
} else if !c.isAccessAllowed() {
|
||||
} else if !isUnauthenticatedFTPUser && !c.isAccessAllowed() {
|
||||
defer func(conn ActiveConnection) {
|
||||
err := conn.Disconnect()
|
||||
logger.Info(conn.GetProtocol(), conn.GetID(), "access conditions not met for user: %q close connection err: %v",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue