I am using the library to send/receive messages to a message broker (ActiveMQ Artemis). Also I have a handler for TaskScheduler.UnobservedTaskException to close the process if any exception occurs.
If I send a message while the connection with the message broker is down, I receive an exception (as expected).
The problem is that I also get an UnobservedTaskException containing a TimeoutException because of it.
The call link.Send can fail, but if that happens, the timer is not disposed and the timeout exception is thrown in an unobserved task.
This king of behavior also happens when the link.Send fails, but onOutcome callback is still fired.
I am using the library to send/receive messages to a message broker (ActiveMQ Artemis). Also I have a handler for TaskScheduler.UnobservedTaskException to close the process if any exception occurs.
If I send a message while the connection with the message broker is down, I receive an exception (as expected). The problem is that I also get an UnobservedTaskException containing a TimeoutException because of it.
It seems that the problem is in SendTask class:
The call link.Send can fail, but if that happens, the timer is not disposed and the timeout exception is thrown in an unobserved task. This king of behavior also happens when the link.Send fails, but onOutcome callback is still fired.