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(); } }