This commit is contained in:
simonzhangsz committed 2023-08-16 14:08:55 +08:00
1 parent 70d98d97f0
commit 8953356c47
11 files changed
+368 -3

No files matched your search

+1 -1
View File
@@ -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)
}