[Modify] Polish it
This commit is contained in:
parent
b9fd153759
commit
27afa4ebe5
@ -418,6 +418,7 @@ namespace WebSocketSharp.Net
|
|||||||
private void cleanupConnections ()
|
private void cleanupConnections ()
|
||||||
{
|
{
|
||||||
HttpConnection[] conns = null;
|
HttpConnection[] conns = null;
|
||||||
|
|
||||||
lock (_connectionsSync) {
|
lock (_connectionsSync) {
|
||||||
if (_connections.Count == 0)
|
if (_connections.Count == 0)
|
||||||
return;
|
return;
|
||||||
@ -426,6 +427,7 @@ namespace WebSocketSharp.Net
|
|||||||
var keys = _connections.Keys;
|
var keys = _connections.Keys;
|
||||||
conns = new HttpConnection[keys.Count];
|
conns = new HttpConnection[keys.Count];
|
||||||
keys.CopyTo (conns, 0);
|
keys.CopyTo (conns, 0);
|
||||||
|
|
||||||
_connections.Clear ();
|
_connections.Clear ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user