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

v6.15.0 introduces breaking changes with the new server.listen unix socket method #242

Closed
tayler-king opened this issue Mar 28, 2024 · 1 comment

Comments

@tayler-king
Copy link
Contributor

Prior to v6.15.0, server.listen(port, host) would accept a string for the port, such as "8080".

With v6.15.0 it now assumes that port is a unix socket if it is a string. This is a breaking change and should be treated as such.

Possible hotfix if you don't want to introduce a breaking change is to check if the host argument has been passed, rather than checking if port is a string, or check if port is castable to a number.

@kartikk221
Copy link
Owner

This has been fixed in the recent v6.15.1 update and casts first argument strings to the numeric port range before treating it as a unix domain socket path.

With that said, The types and documentation has always dictated the port argument should be a number and acceptance of a string was a side-effect of uWebsockets.js not enforcing its types.

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