internal void AbortChannel() { if ((Channel != null) && Channel.HasSession) { try { Channel.Abort(); } catch (Exception e) { if (Fx.IsFatal(e)) { throw; } channelHandler.HandleError(e); } } }
private bool HandleErrorContinuation(Exception e, RequestContext request, ServiceChannel channel, ref ErrorHandlerFaultInfo faultInfo, bool replied) { if (replied) { try { request.Close(); } catch (Exception e1) { if (Fx.IsFatal(e1)) { throw; } this.HandleError(e1); } } else { request.Abort(); } if (!this.HandleError(e, ref faultInfo) && _hasSession) { if (channel != null) { if (replied) { TimeoutHelper timeoutHelper = new TimeoutHelper(CloseAfterFaultTimeout); try { channel.Close(timeoutHelper.RemainingTime()); } catch (Exception e2) { if (Fx.IsFatal(e2)) { throw; } this.HandleError(e2); } try { _binder.CloseAfterFault(timeoutHelper.RemainingTime()); } catch (Exception e3) { if (Fx.IsFatal(e3)) { throw; } this.HandleError(e3); } } else { channel.Abort(); _binder.Abort(); } } else { if (replied) { try { _binder.CloseAfterFault(CloseAfterFaultTimeout); } catch (Exception e4) { if (Fx.IsFatal(e4)) { throw; } this.HandleError(e4); } } else { _binder.Abort(); } } } return(true); }
bool HandleErrorContinuation(Exception e, RequestContext request, ServiceChannel channel, ref ErrorHandlerFaultInfo faultInfo, bool replied) { if (replied) { try { request.Close(); } catch (Exception e1) { if (Fx.IsFatal(e1)) { throw; } this.HandleError(e1); } } else { request.Abort(); } if (!this.HandleError(e, ref faultInfo) && this.hasSession) { if (channel != null) { if (replied) { TimeoutHelper timeoutHelper = new TimeoutHelper(CloseAfterFaultTimeout); try { channel.Close(timeoutHelper.RemainingTime()); } catch (Exception e2) { if (Fx.IsFatal(e2)) { throw; } this.HandleError(e2); } try { this.binder.CloseAfterFault(timeoutHelper.RemainingTime()); } catch (Exception e3) { if (Fx.IsFatal(e3)) { throw; } this.HandleError(e3); } } else { channel.Abort(); this.binder.Abort(); } } else { if (replied) { try { this.binder.CloseAfterFault(CloseAfterFaultTimeout); } catch (Exception e4) { if (Fx.IsFatal(e4)) { throw; } this.HandleError(e4); } } else { this.binder.Abort(); } } } return true; }
void ICommunicationObject.Abort() { _serviceChannel.Abort(); }
private bool HandleError(Exception e, RequestContext request, ServiceChannel channel) { bool flag; ErrorHandlerFaultInfo faultInfo = new ErrorHandlerFaultInfo(this.messageVersion.Addressing.DefaultFaultAction); this.ProvideFaultAndReplyFailure(request, e, ref faultInfo, out flag); if (flag) { try { request.Close(); } catch (Exception exception) { if (Fx.IsFatal(exception)) { throw; } this.HandleError(exception); } } else { request.Abort(); } if (!this.HandleError(e, ref faultInfo) && this.hasSession) { if (channel != null) { if (flag) { TimeoutHelper helper = new TimeoutHelper(CloseAfterFaultTimeout); try { channel.Close(helper.RemainingTime()); } catch (Exception exception2) { if (Fx.IsFatal(exception2)) { throw; } this.HandleError(exception2); } try { this.binder.CloseAfterFault(helper.RemainingTime()); goto Label_0117; } catch (Exception exception3) { if (Fx.IsFatal(exception3)) { throw; } this.HandleError(exception3); goto Label_0117; } } channel.Abort(); this.binder.Abort(); } else { if (flag) { try { this.binder.CloseAfterFault(CloseAfterFaultTimeout); goto Label_0117; } catch (Exception exception4) { if (Fx.IsFatal(exception4)) { throw; } this.HandleError(exception4); goto Label_0117; } } this.binder.Abort(); } } Label_0117: return true; }