Skip to content

How to know is any connection active in pool? #823

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
Mil0R opened this issue May 19, 2014 · 3 comments
Closed

How to know is any connection active in pool? #823

Mil0R opened this issue May 19, 2014 · 3 comments
Labels

Comments

@Mil0R
Copy link

Mil0R commented May 19, 2014

In a loop there are many callback, I want to call pool.end() after all callback end, so how to know that moment that all connections are released?

@dougwilson
Copy link
Member

so how to know that moment that all connections are released?

You would keep track of your callbacks with standards node.js flow control libraries.

@sidorares
Copy link
Member

What is exactly the problem you are solving? afaik pool.end() tries to close all connections gracefully, allowing all queued commands to finish

related discussions: #716 #381 #751

@Mil0R
Copy link
Author

Mil0R commented May 19, 2014

@dougwilson thanks, I track every callbacks and call connection.release() every time.

@Mil0R Mil0R closed this as completed May 19, 2014
dveeden pushed a commit to dveeden/mysql that referenced this issue Jan 31, 2023
* Remove Go 1.7 from travis.yml

* drop Go 1.7 support

* remove the watcher interface

* update gofmt

* remove cloneTLSConfig, and use (*tls.Config).Clone directly instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants