private void CompleteOpen(IDuplexSessionChannel channel, IAsyncResult result) { Exception exception = null; bool flag = false; try { channel.EndOpen(result); flag = true; } catch (CommunicationException exception2) { if (DiagnosticUtility.ShouldTraceInformation) { DiagnosticUtility.ExceptionUtility.TraceHandledException(exception2, TraceEventType.Information); } } catch (TimeoutException exception3) { if (DiagnosticUtility.ShouldTraceInformation) { DiagnosticUtility.ExceptionUtility.TraceHandledException(exception3, TraceEventType.Information); } } catch (Exception exception4) { if (Fx.IsFatal(exception4)) { throw; } exception = exception4; } finally { if (!flag) { channel.Abort(); } } if (flag) { this.inputChannelAcceptor.AcceptInnerChannel(this, channel); } else if (exception != null) { this.inputChannelAcceptor.Enqueue(exception, null); } }
protected override void OnEndOpen(IAsyncResult result) { innerChannel.EndOpen(result); }