New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double knex.client.pool.destroy tries to call drain on undefined and throws #90

Closed
moll opened this Issue Oct 10, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@moll
Collaborator

moll commented Oct 10, 2013

Hey again,

Calling knex.client.pool.destroy twice throws a TypeError: Cannot call method 'drain' of undefined from knex/clients/pool.js:83:20. I'm destroying the pool from various callbacks (such as server or process exit) and it often gets destroyed more than once.

Perhaps destroy should just succeed and not attempt to drain again if it's already dead?

@tgriesser

This comment has been minimized.

Owner

tgriesser commented Oct 14, 2013

Thanks - should be good, with tests.

@tgriesser tgriesser closed this Oct 14, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment