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