protected bool SetState(ChannelStateType state) { if (_state == state) { return(false); } _state = state; StateChanged?.Invoke(this, state); if (state == ChannelStateType.Closed) { MakeAllRequestsGetException(new RequestChannelException()); } return(true); }
public ChannelBase(ILog logger) { _state = ChannelStateType.Closed; _logger = logger; }