internal void Complete(Exception exception)
{
_exception = InGet && (exception is ObjectDisposedException)
? new HttpListenerException (500, "Listener closed")
: exception;
lock (_sync) {
_completed = true;
if (_waitHandle != null)
_waitHandle.Set ();
if (_callback != null)
ThreadPool.QueueUserWorkItem (invokeCallback, this);
}
}