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

Emit connect event with error (if connecting) or emit errorMessage event... #94

Merged
merged 1 commit into from
Apr 28, 2013
Merged

Emit connect event with error (if connecting) or emit errorMessage event... #94

merged 1 commit into from
Apr 28, 2013

Conversation

rappdw
Copy link
Contributor

@rappdw rappdw commented Apr 23, 2013

... on socket error

When a network issue prevents connection to the database, there is no
callback made to the connection callback nor to the errorMessage
callback. Only the connection.end event is fired. This leads to silent
failures.

…ent on socket error

When a network issue prevents connection to the database, there is no
callback made to the connection callback nor to the errorMessage
callback. Only the connection.end event is fired. This leads to silent
failures.
@rappdw
Copy link
Contributor Author

rappdw commented Apr 23, 2013

I had a situation in which connections to a database could not be made intermittently due to network configuration issues.

When connections were not established, my expectation was that the connection.on('connect', callback) would be called with error information. This was never called.

This lead to situations in which I was unable to determine easily that their had been a failure and to take appropriate action in those cases.

This pull request addresses the situation that I had encountered.

pekim added a commit that referenced this pull request Apr 28, 2013
Emit connect event with error (if connecting) or emit errorMessage event...
@pekim pekim merged commit deae075 into tediousjs:master Apr 28, 2013
@rappdw rappdw deleted the silentFailOnSocketError branch April 28, 2013 18:13
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

Successfully merging this pull request may close these issues.

None yet

2 participants