-
Notifications
You must be signed in to change notification settings - Fork 443
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
request callback not called on socket error #324
Comments
This was referenced Oct 13, 2015
Interesting, this could well be the source of the resource leak woes I've been having in production. I'll try it out and report back sometime tomorrow hopefully. |
fyi, i think the patch should be: socketError: function(err) {
const sqlRequest = this.request;
this.request = void 0;
sqlRequest.callback(err);
return this.transitionTo(this.STATE.FINAL);
}, made an error with what version i pushed, it wasn't passing along the socket error |
Would you mind turning your patch into an actual pull request? Also, adding a test to the test suite would be helpful. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
When a socket error occurs the request callback is never called. I've created a proof of concept patch to show how to work around the issue. The goal of this patch is to ensure that when a request exists on the connection the connection should ensure that the request callback gets called.
ashelley@a9ef6e2
Here is my test code to show that the callback is never called:
While running the above program after I see it start querying I block the port to simulate a socket error:
# iptables -A OUTPUT -p tcp --dport $SQL_PORT -j DROP
The text was updated successfully, but these errors were encountered: