Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kylepl
Copy link
Contributor

@kylepl kylepl commented Jul 27, 2023

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).

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

sgoth commented Feb 8, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants