Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hugefiver committed Jul 10, 2024
1 parent 2eee3e3 commit 54b6bde
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ func StartSSHServer(config *ssh.ServerConfig, opt *Option) {
// Handle connects
for {
conn, err := listener.Accept()
if err != nil {
log.Debugf("[Disconnect] failed to accept connect %v : %v", conn.RemoteAddr(), err)
}

var ip string
addr, ok := conn.RemoteAddr().(*net.TCPAddr)
Expand All @@ -84,9 +87,6 @@ func StartSSHServer(config *ssh.ServerConfig, opt *Option) {
continue
}

if err != nil {
log.Debugf("[Disconnect] failed to accept connect %v : %v", conn.RemoteAddr(), err)
}
go handleConn(conn, config)
}
}
Expand Down

0 comments on commit 54b6bde

Please sign in to comment.