We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a740a01 commit f744191Copy full SHA for f744191
yasio/io_service.cpp
@@ -834,11 +834,10 @@ void io_service::handle_stop()
834
if (this->state_ != state::AT_EXITING)
835
{
836
// after join if state not AT_EXITING, means worker thread was terminated externally
837
- // i.g .net managed exception occurred when invoke c# delegate
+ // i.g .net managed exception occurred when invoke c# delegate and we should clear pending
838
+ // events to prevent dispatch to io event handler again
839
YASIO_KLOGW("[core] the worker thread terminated unexpectedly");
840
handle_worker_exit();
- // clear pending events to prevent dispatch to io event handler due to the handler
841
- // has unexpected exception
842
this->events_.clear();
843
}
844
0 commit comments