brianc / node-pg-pool

A connection pool for node-postgres
MIT License
180 stars 64 forks source link

fix for cases where connection is broken and release() is called, avo… #118

Open olgkpln opened 5 years ago

olgkpln commented 5 years ago

Fixing a case when release() is called for a broken connection. without this, the broken connection is returned to the idle pool and reused.

brianc commented 5 years ago

Thanks for the pull request @olgkpln! Any way you could write a test for this?

johanneswuerbach commented 5 years ago

I think https://github.com/brianc/node-pg-pool/pull/115 is a better way to prevent this or is there any other way then double releasing the client to trigger this bug?

brianc commented 5 years ago

ah yeah if #115 fixes this I can just merge that one.

olgkpln commented 5 years ago

115 is a good fix as well