[Modify] Polish it
This commit is contained in:
parent
ce577ff0f7
commit
ee3cadf19c
@ -457,6 +457,7 @@ namespace WebSocketSharp.Net
|
|||||||
private void cleanupContextRegistry ()
|
private void cleanupContextRegistry ()
|
||||||
{
|
{
|
||||||
HttpListenerContext[] ctxs = null;
|
HttpListenerContext[] ctxs = null;
|
||||||
|
|
||||||
lock (_ctxRegistrySync) {
|
lock (_ctxRegistrySync) {
|
||||||
if (_ctxRegistry.Count == 0)
|
if (_ctxRegistry.Count == 0)
|
||||||
return;
|
return;
|
||||||
@ -465,6 +466,7 @@ namespace WebSocketSharp.Net
|
|||||||
var keys = _ctxRegistry.Keys;
|
var keys = _ctxRegistry.Keys;
|
||||||
ctxs = new HttpListenerContext[keys.Count];
|
ctxs = new HttpListenerContext[keys.Count];
|
||||||
keys.CopyTo (ctxs, 0);
|
keys.CopyTo (ctxs, 0);
|
||||||
|
|
||||||
_ctxRegistry.Clear ();
|
_ctxRegistry.Clear ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user