[Modify] Add it

This commit is contained in:
sta 2021-05-24 20:59:07 +09:00
parent d9519aacaa
commit bc070a309f

View File

@ -148,6 +148,30 @@ namespace WebSocketSharp.Net
#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)
{
lock (asyncResult._sync) {