-
Notifications
You must be signed in to change notification settings - Fork 95
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
Application crashing when No Response from server
#113
Comments
Also with the new update it is possible for the
|
Hi there, you did some impressive job here :-) I will do some additional testing on that topic, and I am planning to release a pre-release version , that could make your life much easier. Thanks for the effort I will come back to you ! |
I had this error multiple times |
I ended up rewriting this to suit my needs. I did not do all the auto connection close things but this may help with solving the issues that I was facing here.
|
I experience the same issue in my tests (and possibly in the app I'm working on):
The first test checks that the SSH error is correctly handled by our code when the URL is incorrect. BUT when running this test suite, the second test actually fails! I think this is caused by this line: https://github.com/agebrock/tunnel-ssh/blob/master/index.js#L123 sshConnection.forwardOut(
forwardOptionsLocal.srcAddr,
forwardOptionsLocal.srcPort,
forwardOptionsLocal.dstAddr,
forwardOptionsLocal.dstPort, (err, stream) => {
if (err) {
if (server) {
server.close()
}
throw err;
} else {
clientConnection.pipe(stream).pipe(clientConnection);
}
}); We should not throw the error in this callback, but instead send it back to |
Hey,
I am trying to handle all errors to stop this from crashing my application if the server goes down. Instead it will gracefully handle them and reconnect.
Below is what I currently have but I am facing a issue with if the server goes down on the server it will crash my application. I have purposly stopped mongo on the server that it is connecting to simulate this.
The text was updated successfully, but these errors were encountered: