This commit is contained in:
suyl
2021-07-29 18:37:28 +08:00
parent 37440aa104
commit bd23a4d42a

View File

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