public void Abort(Exception ex) { lock (_protocolSelectionLock) { _requestProcessor?.Abort(ex); _requestProcessor = null; } }
private void Abort(ConnectionAbortedException ex) { lock (_protocolSelectionLock) { switch (_protocolSelectionState) { case ProtocolSelectionState.Initializing: CloseUninitializedConnection(ex); break; case ProtocolSelectionState.Selected: _requestProcessor.Abort(ex); break; case ProtocolSelectionState.Aborted: break; } _protocolSelectionState = ProtocolSelectionState.Aborted; } }
private void Abort(ConnectionAbortedException ex) { ProtocolSelectionState previousState; lock (_protocolSelectionLock) { previousState = _protocolSelectionState; Debug.Assert(previousState != ProtocolSelectionState.Initializing, "The state should never be initializing"); _protocolSelectionState = ProtocolSelectionState.Aborted; } switch (previousState) { case ProtocolSelectionState.Selected: _requestProcessor.Abort(ex); break; case ProtocolSelectionState.Aborted: break; } }
public void Abort(Exception ex) { lock (_protocolSelectionLock) { switch (_protocolSelectionState) { case ProtocolSelectionState.Initializing: CloseUninitializedConnection(); break; case ProtocolSelectionState.Selected: case ProtocolSelectionState.Stopping: _requestProcessor.Abort(ex); break; case ProtocolSelectionState.Stopped: break; } _protocolSelectionState = ProtocolSelectionState.Stopped; } }
private void Abort(ConnectionAbortedException ex) { ProtocolSelectionState previousState; lock (_protocolSelectionLock) { previousState = _protocolSelectionState; _protocolSelectionState = ProtocolSelectionState.Aborted; } switch (previousState) { case ProtocolSelectionState.Initializing: _context.ConnectionContext.Abort(ex); break; case ProtocolSelectionState.Selected: _requestProcessor.Abort(ex); break; case ProtocolSelectionState.Aborted: break; } }