Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added admin features #64

Merged
merged 11 commits into from
Dec 26, 2019
Prev Previous commit
Next Next commit
Fixed unixconn close
  • Loading branch information
antoniomika committed Dec 24, 2019
commit 7d1db5041855de593f7bb9069e0479efc6113eb8
10 changes: 8 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,14 @@ func (s *SSHConnection) CleanUp(state *State) {
_, ok := key.(*net.UnixAddr)

if ok {
actualUnixListener := val.(*net.UnixListener)
actualUnixListener.Close()
actualUnixListener, ok := val.(*net.UnixListener)

if ok {
actualUnixListener.Close()
} else {
actualUnixConn := val.(*net.UnixConn)
actualUnixConn.Close()
}
} else {
actualTCPListener := val.(*net.TCPListener)
actualTCPListener.Close()
Expand Down