protected override void OnDispose() { if (_senders != null) { _senders.Clear(); _senders = null; } if (_receiverConnection is null) { return; } _receiverConnection.UnsubscribeAsync().WaitAsync(); _receiverConnection = null; }
protected override void OnDispose() { if (_connection is null) { return; } try { _connection.UnsubscribeAsync().WaitAsync(); } catch { // ignored } _connection = null; }