Skip to content

Conversation

GertSallaerts
Copy link

@GertSallaerts GertSallaerts commented Sep 30, 2016

Related to my previous PR (#137).

  • Not sure why it seemed to work, but the _handleConnectionTerminated handler never really worked because it wasn't bound correctly and 'this.onerror is always undefined. So I bound the function.
  • Upon reflection, I don't think that the server closing a connection should be considered as an error, the connection is simply not open anymore for whatever reason. Once you try to open a new connection, you'll get a more accurate error message like the server not being reachable anymore for example or no error is there is a failover setup configured, ... So instead of throwing an error, I close the connection.
  • The pool did not call the _destroy method on resources that are detected as invalid during acquisition, so they weren't being cleaned up correctly.

@pontusmelke
Copy link
Contributor

Awesome, thanks! I am currently looking into this. I think I will end up putting the onerror call back.

@pontusmelke pontusmelke merged commit ce8ee5c into neo4j:1.1 Oct 11, 2016
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.

2 participants