[Modify] Polish it
This commit is contained in:
parent
dc420c7b7e
commit
9b6c7d300e
@ -449,16 +449,12 @@ namespace WebSocketSharp.Net
|
|||||||
|
|
||||||
private void cleanupWaitQueue (Exception exception)
|
private void cleanupWaitQueue (Exception exception)
|
||||||
{
|
{
|
||||||
HttpListenerAsyncResult[] aress = null;
|
|
||||||
|
|
||||||
lock (_waitQueueSync) {
|
|
||||||
if (_waitQueue.Count == 0)
|
if (_waitQueue.Count == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
aress = _waitQueue.ToArray ();
|
var aress = _waitQueue.ToArray ();
|
||||||
|
|
||||||
_waitQueue.Clear ();
|
_waitQueue.Clear ();
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var ares in aress)
|
foreach (var ares in aress)
|
||||||
ares.Complete (exception);
|
ares.Complete (exception);
|
||||||
|
Loading…
Reference in New Issue
Block a user