node-pg-pool
node-pg-pool copied to clipboard
Fix _endCallback
If Pool#end happens between client initiate connection and receiving callback with error, _endCallback will be never called.
Is it possible to include a test?
I tried do this, but found this is not trivial
Any updates? Tests required for each PR?
You should be able to write the test by making a net.Server that does nothing with the client it accepts but call pool.end() and close the connection. There are a few similar tests that already exist (look for createServer).