This commit is contained in:
suyl
2021-07-29 15:15:10 +08:00
parent f7281ee9a9
commit 2fab08a747

View File

@@ -127,7 +127,9 @@ func (t *TcpClient) delConn(key string) {
defer t.Unlock()
delete(t.Clients, key)
t.Clients[key].C.Close()
if t.Clients[key].C != nil {
t.Clients[key].C.Close()
}
}
func (t *TcpClient) addConn(c net.Conn, key string, status int) {