[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 (); _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);
} }