[Modify] Replace it
This commit is contained in:
parent
393cfb3dca
commit
9bc49eb327
@ -511,23 +511,7 @@ namespace WebSocketSharp.Net
|
|||||||
{
|
{
|
||||||
_socket.Close ();
|
_socket.Close ();
|
||||||
|
|
||||||
HttpConnection[] conns = null;
|
clearConnections ();
|
||||||
|
|
||||||
lock (_unregisteredSync) {
|
|
||||||
var cnt = _unregistered.Count;
|
|
||||||
|
|
||||||
if (cnt == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
conns = new HttpConnection[cnt];
|
|
||||||
|
|
||||||
_unregistered.CopyTo (conns, 0);
|
|
||||||
_unregistered.Clear ();
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var i = conns.Length - 1; i >= 0; i--)
|
|
||||||
conns[i].Close (true);
|
|
||||||
|
|
||||||
EndPointManager.RemoveEndPoint (_endpoint);
|
EndPointManager.RemoveEndPoint (_endpoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user