mirror of
https://github.com/bcicen/ctop.git
synced 2025-11-13 06:35:39 +01: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