This commit is contained in:
esrrhs committed 2019-10-26 09:39:36 +08:00
1 parent 111b7397d8
commit ff3daaed0f
1 file changed
+6 -1
+6 -1
View File
@@ -285,7 +285,12 @@ func (p *Server) Recv(conn *ServerConn, id string, src *net.IPAddr) {
func (p *Server) Close(conn *ServerConn) {
if p.localConnMap[conn.id] != nil {
conn.conn.Close()
if conn.conn != nil {
conn.conn.Close()
}
if conn.tcpconn != nil {
conn.tcpconn.Close()
}
delete(p.localConnMap, conn.id)
}
}