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

mqtt: fix MQTT client PINGREQ failure when using LIBUV as event driver. #3265

Open
wants to merge 4 commits into
base: v4.3-stable
Choose a base branch
from

Conversation

lucas-law
Copy link
Contributor

When libuv is used as the underlying event-driven mechanism, the keepalive operation between the MQTT client and the server fails. The reason is that the keepalive operation should send a PINGREQ, but in fact, it is not sent. The problem lies in the fact that the modification of the underlying I-O-related events is not triggered, resulting in the inability to trigger I/O events. Through testing, modifying the mux_substream flag can solve this problem.

@lws-team
Copy link
Member

lws-team commented Nov 8, 2024

Thanks... does it make trouble to change the test to a runtime one like if (lws_check_opt(context->options, LWS_SERVER_OPTION_LIBUV)) ? The reason is it's possible to build lws with the LIBUV config, but actually select some other event loop at runtime.

@lucas-law
Copy link
Contributor Author

Of course, your approach is more elegant. I'll push the changes.

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