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

fs.unlink() is used as if it was synchronous when deleting a stale UNIX socket #167

Open
matteomonti opened this issue May 29, 2018 · 0 comments

Comments

@matteomonti
Copy link

In lib/sockets/sock.js, line 385, you handle the case of a pre-existing UNIX socket: you check if it's stale by connecting and if it is you delete it. However, in order to do that, you call fs.unlink(port), which is an asynchronous function.

This results in a deprecation error and possibly undefined behavior.

You might want to either switch to fs.unlinkSync or provide a callback to fs.unlink and move self.server.listen(port, host, fn) to the callback.

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

1 participant