Throw an error when the port has been used #591
Unanswered
mustard-mh
asked this question in
Q&A
Replies: 1 comment 1 reply
-
const listen_options = { SHARED: 0, EXCLUSIVE: 1 };
app.listen(8080, listen_options.EXCLUSIVE, (token) => {
if (token) {
console.log('uws :: listening to 8080..');
} else {
throw new Error('uws :: app.listen failed, invalid token');
}
}); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
p1 p2 run
$node index.js
all requests send to p1; p2 didn't throw any error
Beta Was this translation helpful? Give feedback.
All reactions