public void Shutdown(int timeoutMs = Timeout.Infinite) { if (_shutdownSwitch.TryTake()) { _reconnectionTimer.Change(Timeout.Infinite, Timeout.Infinite); _session.WaitForAllPendingActions(timeoutMs); _session.Dispose(); } }
public void Shutdown(int timeoutMs = Timeout.Infinite) { if (shotDown.TryTake()) { _reconnectionTimer.Change(Timeout.Infinite, Timeout.Infinite); if (_activeConnection.Value != null) { _activeConnection.Value.FreeStreamId(_lockingStreamId); } _session.WaitForAllPendingActions(timeoutMs); _session.InternalDispose(); } }