lee-chrisbell opened a new issue #51: URL: https://github.com/apache/pulsar-dotpulsar/issues/51
When SetupChannel throws an exception, the application crashes because the method is async void. I propose catching exceptions in this method and setting the ConsumerState or ProducerState to faulted. ```c# private async void SetupChannel() { try { var channel = await _factory.Create(CancellationTokenSource.Token).ConfigureAwait(false); await _consumer.SetChannel(channel).ConfigureAwait(false); } catch(Exception ex) { Console.WriteLine($"Consumer state is now faulted \n {ex.ToString()}"); _stateManager.SetState(ConsumerState.Faulted); } } ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org