[Modify] Add it
This commit is contained in:
parent
d9519aacaa
commit
bc070a309f
@ -148,6 +148,30 @@ namespace WebSocketSharp.Net
|
|||||||
|
|
||||||
#region Private Methods
|
#region Private Methods
|
||||||
|
|
||||||
|
private void complete ()
|
||||||
|
{
|
||||||
|
lock (_sync) {
|
||||||
|
_completed = true;
|
||||||
|
|
||||||
|
if (_waitHandle != null)
|
||||||
|
_waitHandle.Set ();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_callback == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
ThreadPool.QueueUserWorkItem (
|
||||||
|
state => {
|
||||||
|
try {
|
||||||
|
_callback (this);
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
null
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
private static void complete (HttpListenerAsyncResult asyncResult)
|
private static void complete (HttpListenerAsyncResult asyncResult)
|
||||||
{
|
{
|
||||||
lock (asyncResult._sync) {
|
lock (asyncResult._sync) {
|
||||||
|
Loading…
Reference in New Issue
Block a user