internal void EmptySendCallback(IAsyncResult result) { Exception exception = null; if (!result.CompletedSynchronously) { EmptySendContext asyncState = (EmptySendContext)result.AsyncState; try { asyncState.writer.EndGetContentStream(result).Close(); } catch (Exception exception2) { exception = exception2; } asyncState.result.InvokeCallback(exception); } }
internal void EmptySendCallback(IAsyncResult result) { Exception e = null; if (result.CompletedSynchronously) { return; } EmptySendContext context = (EmptySendContext)result.AsyncState; try{ context.writer.EndGetContentStream(result).Close(); } catch (Exception ex) { e = ex; } context.result.InvokeCallback(e); }