private void ShutdownTimeoutHandler(object state) { LinkedListNode <ShutdownAsyncRequest <Response> > listNode = (LinkedListNode <ShutdownAsyncRequest <Response> >)state; ShutdownAsyncRequest <Response> shutdownAsyncRequest = listNode.Value; if (shutdownAsyncRequest != null && shutdownAsyncRequest.TryLock()) { lock (@lock) { if (listNode.List != null) { request = null; } } shutdownAsyncRequest.Dispose(); shutdownAsyncRequest.SetResult(_httpHelper.ServerShutdownTimeout); } }
public void NotifyShutdownCompleted() { request?.SetResult(_httpHelper.OperationSuccessful()); }