This commit is contained in:
esrrhs 2019-10-26 09:39:36 +08:00
parent 111b7397d8
commit ff3daaed0f

View File

@ -285,7 +285,12 @@ func (p *Server) Recv(conn *ServerConn, id string, src *net.IPAddr) {
func (p *Server) Close(conn *ServerConn) { func (p *Server) Close(conn *ServerConn) {
if p.localConnMap[conn.id] != nil { if p.localConnMap[conn.id] != nil {
if conn.conn != nil {
conn.conn.Close() conn.conn.Close()
}
if conn.tcpconn != nil {
conn.tcpconn.Close()
}
delete(p.localConnMap, conn.id) delete(p.localConnMap, conn.id)
} }
} }