uSockets icon indicating copy to clipboard operation
uSockets copied to clipboard

Fix ASIO usage for uWS::Loop::defer.

Open kylepl opened this issue 2 years ago • 1 comments

This was resulting it being called with the wrong address once uWS::Loop::wakeupCb was called.

I observed that uWS::Loop::defer was not ever triggering, and tracked it down to a memory address difference between the loop and what uWS::Loop::wakeupCb was being called with.

I'm not sure this is the proper fix - but it helps my use-case - is it reasonable for all uses (not just uWebSockets)? Also, IIUC, not sure why others are not experiencing this issue (perhaps low usage of ASIO?).

This is the repro case, that now behaves properly with the fix (i.e. it exits, and does not get stuck when using Defer).

kylepl avatar Jul 27 '23 04:07 kylepl

I see the same issue. A fully working async server works perfectly fine with epoll but uWs::Loop::defer does not trigger when using ASIO.

sgoth avatar Feb 08 '24 16:02 sgoth