From 282615565344f450d54bef156329f2d24a9addbd Mon Sep 17 00:00:00 2001 From: Kyle Loveless Date: Thu, 27 Jul 2023 00:13:35 -0400 Subject: [PATCH] Fix ASIO usage for uWS::Loop::defer. This was resulting it being called with the wrong address once uWS::Loop::wakeupCb was called. --- src/eventing/asio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eventing/asio.cpp b/src/eventing/asio.cpp index 6bbdcf71..604cf56c 100644 --- a/src/eventing/asio.cpp +++ b/src/eventing/asio.cpp @@ -422,7 +422,7 @@ struct us_internal_async *us_internal_create_async(struct us_loop_t *loop, int f // these properties are accessed from another thread when wakeup cb->m.lock(); cb->loop = loop; // the only lock needed - cb->cb_expects_the_loop = 0; + cb->cb_expects_the_loop = 1; cb->p.poll_type = POLL_TYPE_CALLBACK; // this is missing from libuv flow cb->m.unlock();