Unobserved exception
See original GitHub issueBroker: Mosquitto v1.4.14 MQTTnet: v2.6.0
Both the connection and server are stable but exceptions like these happen alot.
System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. ---> MQTTnet.Exceptions.MqttCommunicationTimedOutException: Exception of type 'MQTTnet.Exceptions.MqttCommunicationTimedOutException' was thrown.
at MQTTnet.Internal.TaskExtensions.<TimeoutAfter>d__1`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MQTTnet.Client.MqttPacketDispatcher.<WaitForPacketAsync>d__4.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.TaskExceptionHolder.Finalize()
---> (Inner Exception #0) MQTTnet.Exceptions.MqttCommunicationTimedOutException: Exception of type 'MQTTnet.Exceptions.MqttCommunicationTimedOutException' was thrown.
at MQTTnet.Internal.TaskExtensions.<TimeoutAfter>d__1`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MQTTnet.Client.MqttPacketDispatcher.<WaitForPacketAsync>d__4.MoveNext()<---
Issue Analytics
- State:
- Created 6 years ago
- Comments:22 (5 by maintainers)
Top Results From Across the Web
TaskScheduler.UnobservedTaskException Event
Occurs when a faulted task's unobserved exception is about to trigger exception escalation policy, which, by default, would terminate the process.
Read more >TaskScheduler.UnobservedTaskException event handler ...
The UnobservedTaskException will only happen if a Task gets collected by the GC with an exception unobserved - as long as you hold...
Read more >Async Wandering Part 7 — Exceptions on unobserved tasks
It doesn't print any exception because we don't await the task. Can we do something about it? Let's use the UnobservedTaskException handler:.
Read more >Unobserved task exception · Issue #29067 · dotnet/runtime
It seems like an exception is bubbling up through your code, and whatever code is using yours is in a task that catches...
Read more >Curious Case of Exceptions in Async Methods — Part 2
Unobserved Task Exception : A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

nope you can publish an array of Messages, or if you simply whant to fire and forget you can wrap publish with an async void method that handles the exception. but thats not good practise
Probably fixed with the latests commits in development, thanks for the effort.