[Modify] Replace it

This commit is contained in:
sta 2020-10-25 17:42:20 +09:00
parent 393cfb3dca
commit 9bc49eb327

View File

@ -511,23 +511,7 @@ namespace WebSocketSharp.Net
{
_socket.Close ();
HttpConnection[] conns = null;
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);
clearConnections ();
EndPointManager.RemoveEndPoint (_endpoint);
}