node-pg-pool icon indicating copy to clipboard operation
node-pg-pool copied to clipboard

Fix _endCallback

Open fanatid opened this issue 7 years ago • 4 comments

If Pool#end happens between client initiate connection and receiving callback with error, _endCallback will be never called.

fanatid avatar Oct 01 '18 14:10 fanatid

Is it possible to include a test?

charmander avatar Oct 02 '18 15:10 charmander

I tried do this, but found this is not trivial

fanatid avatar Oct 02 '18 17:10 fanatid

Any updates? Tests required for each PR?

fanatid avatar May 30 '19 18:05 fanatid

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

charmander avatar May 31 '19 10:05 charmander