Skip to content

In pure js, pg.end() is not quiting everything #559

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

Closed
3nsoft opened this issue Apr 5, 2014 · 1 comment
Closed

In pure js, pg.end() is not quiting everything #559

3nsoft opened this issue Apr 5, 2014 · 1 comment

Comments

@3nsoft
Copy link

3nsoft commented Apr 5, 2014

In pure js package (pg.js, "version": "2.11.1"), when there is an established connection with

pg.connect(conString, function(err, client, done) {
});

and if done() is not called, last call in the script

pg.end()

is not quitting the program.
When done() is inserted, quitting happens, therefore, we conclude that pg.end() is not ending not-done connection(s).
If this is an intended behaviour, please, document it, as not 100% end-y. Otherwise, fix is needed.

On a side, kudos for this sweet package! Really like it.

@brianc
Copy link
Owner

brianc commented Apr 6, 2014

Thanks @3nsoft

pg.end() will terminate the connection pool and shut down all idle clients. You still need to return any checked out clients to the pool for it to be able to safely close them and shut everything down. I"ll document that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant