add
This commit is contained in:
parent
111b7397d8
commit
ff3daaed0f
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user