private void NonBlockingCloseCallback(IAsyncResult asyncResult) { try { _responseStream.EndWrite(asyncResult); } catch (Win32Exception) { } finally { _responseStream.Close(); HttpListenerContext.Close(); _responseState = ResponseState.Closed; } }