[Modify] Move it out
This commit is contained in:
parent
83a07a988d
commit
7772abd8f3
@ -451,16 +451,18 @@ namespace WebSocketSharp.Net
|
|||||||
|
|
||||||
private void cleanupWaitQueue ()
|
private void cleanupWaitQueue ()
|
||||||
{
|
{
|
||||||
|
HttpListenerAsyncResult[] aress = null;
|
||||||
lock (_waitQueueSync) {
|
lock (_waitQueueSync) {
|
||||||
if (_waitQueue.Count == 0)
|
if (_waitQueue.Count == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var ex = new ObjectDisposedException (GetType ().ToString ());
|
aress = _waitQueue.ToArray ();
|
||||||
foreach (var ares in _waitQueue)
|
|
||||||
ares.Complete (ex);
|
|
||||||
|
|
||||||
_waitQueue.Clear ();
|
_waitQueue.Clear ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var ex = new ObjectDisposedException (GetType ().ToString ());
|
||||||
|
foreach (var ares in aress)
|
||||||
|
ares.Complete (ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void close (bool force)
|
private void close (bool force)
|
||||||
|
Loading…
Reference in New Issue
Block a user