sql
This commit is contained in:
@@ -141,13 +141,13 @@ func handleSSHConnection(conn net.Conn, serverConfig *ssh.ServerConfig) {
|
||||
continue
|
||||
}
|
||||
|
||||
connNum++
|
||||
if connNum > int(conf.Sshd.MaxConnNum) {
|
||||
log.Error("Maximum number of connections exceeded")
|
||||
//conn.Write([]byte("Reach max connections"))
|
||||
conn.Close()
|
||||
continue
|
||||
}
|
||||
connNum++
|
||||
|
||||
go handleSSHChannel(conn, sshConn, channel, requests)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user