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

Infinite loop in _lws_vhost_init_server_af when binding to an invalid IP address #3307

Open
atoppi opened this issue Jan 8, 2025 · 2 comments

Comments

@atoppi
Copy link

atoppi commented Jan 8, 2025

env: lws 4.3-stable, Ubuntu 24.04, kernel 6.11

When starting a server with lws_create_vhost, the function _lws_vhost_init_server_af gets stuck in an infinite loop when trying to bind to a not valid IP (e.g. not available) address.

lws_socket_bind (https://github.com/warmcat/libwebsockets/blob/v4.3.3/lib/roles/http/server/server.c#L274) returns -1 (LWS_ITOSA_NOT_EXIST) and the initialization is stuck in this busy loop https://github.com/warmcat/libwebsockets/blob/v4.3.3/lib/roles/http/server/server.c#L105-L294.

@lws-team
Copy link
Member

Does the same problem exist on main branch?

@atoppi
Copy link
Author

atoppi commented Jan 10, 2025

No, it doesn't.
Seems to work properly on latest main.

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

No branches or pull requests

2 participants