public async Task DisconnectAsync(TimeSpan timeout)
 {
     try
     {
         await _channel.DisconnectAsync().TimeoutAfter(timeout).ConfigureAwait(false);
     }
     catch (TaskCanceledException)
     {
         throw;
     }
     catch (OperationCanceledException)
     {
         throw;
     }
     catch (MqttCommunicationTimedOutException)
     {
         throw;
     }
     catch (MqttCommunicationException)
     {
         throw;
     }
     catch (Exception exception)
     {
         throw new MqttCommunicationException(exception);
     }
 }
 public async Task DisconnectAsync()
 {
     await _channel.DisconnectAsync();
 }
Example #3
0
 public async Task DisconnectAsync(TimeSpan timeout)
 {
     await ExecuteAndWrapExceptionAsync(() => _channel.DisconnectAsync().TimeoutAfter(timeout));
 }