static void OnQueueAvailable(object state, Exception asyncException) { ChannelCloseAsyncResult enqueuedAsyncResult = (ChannelCloseAsyncResult)state; if (asyncException != null) { enqueuedAsyncResult.Complete(false, asyncException); } else { Exception completionException = null; try { enqueuedAsyncResult.listener.DisposeChannelQueue(); } catch (Exception e) { completionException = e; } enqueuedAsyncResult.Complete(false, completionException); } }
protected override void OnEndClose(IAsyncResult result) { ChannelCloseAsyncResult.End(result); }