Skip to content

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

Merged
merged 1 commit into from Apr 28, 2013

2 participants

@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.

@rappdw rappdw Emit connect event with error (if connecting) or emit errorMessage ev…
…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.
c41ef64
@rappdw
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 pekim merged commit deae075 into pekim:master Apr 28, 2013

1 check passed

Details default The Travis build passed
@rappdw rappdw deleted the unknown repository branch Apr 28, 2013
@momow momow pushed a commit to momow/tedious that referenced this pull request Oct 15, 2014
@JasonPunyon JasonPunyon Generate traffic expectations when the cache is updated. Fixes #94 ae9bdba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.