node-pg-pool
node-pg-pool copied to clipboard
Do not return broken connections to the idle pool
Assuming that clients are unusable after emitting an error, the library should make sure, not to return broken connections to the idle pool.
Idle clients are dropped already on error, this change just extends that behavior to the active clients.
This is an un-breaking change (unless there are client errors one can recover from?), and could potentially remove the only real use-case I found for the second parameter of release.
The error flag on the client is needed because of the callback API.