We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello, I'm trying to handle a connection refused error, if I try to connect to a server that doesn't exist, my app crash.
connection refused
Code:
try { var client = net.createConnection({ port: 49500, host: "255.0.0.0",timeout:1000 }) } catch (error) { console.log(error) }
OR
var client = net.createConnection({ port: 49500, host: "255.0.0.0",timeout:1000 }) .then(val => { console.log("connected") } ).catch(error => { console.log(error) })
The app crash when the client can not connect to the server.
The try catch block should handle the error
The text was updated successfully, but these errors were encountered:
@Fedour57, thanks for your feedback! Please, take a look at #53, it might be your problem. You could try some of the workarounds commented over there.
Sorry, something went wrong.
No branches or pull requests
Description
Hello, I'm trying to handle a
connection refused
error, if I try to connect to a server that doesn't exist, my app crash.Steps to reproduce
Code:
OR
Current behavior
The app crash when the client can not connect to the server.
Expected behavior
The try catch block should handle the error
Relevant information
The text was updated successfully, but these errors were encountered: