[Modify] Replace it
This commit is contained in:
parent
ff4686c128
commit
b6816681f2
@ -505,12 +505,13 @@ namespace WebSocketSharp.Net
|
|||||||
if (!_listening)
|
if (!_listening)
|
||||||
throw new HttpListenerException (995);
|
throw new HttpListenerException (995);
|
||||||
|
|
||||||
var ctx = getContextFromQueue ();
|
if (_contextQueue.Count == 0) {
|
||||||
|
|
||||||
if (ctx == null)
|
|
||||||
_waitQueue.Enqueue (asyncResult);
|
_waitQueue.Enqueue (asyncResult);
|
||||||
else
|
}
|
||||||
|
else {
|
||||||
|
var ctx = _contextQueue.Dequeue ();
|
||||||
asyncResult.Complete (ctx, true);
|
asyncResult.Complete (ctx, true);
|
||||||
|
}
|
||||||
|
|
||||||
return asyncResult;
|
return asyncResult;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user