mirror of
https://github.com/bcicen/ctop.git
synced 2024-08-30 18:23:19 +00:00
check for nil listener before close
This commit is contained in:
@ -44,7 +44,9 @@ func StartServer() {
|
||||
|
||||
func StopServer() {
|
||||
server.wg.Wait()
|
||||
server.ln.Close()
|
||||
if server.ln != nil {
|
||||
server.ln.Close()
|
||||
}
|
||||
}
|
||||
|
||||
func handler(conn net.Conn) {
|
||||
|
Reference in New Issue
Block a user