Skip to content
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

VarnishQueue connect only when needed. #13

Open
georgir opened this issue Dec 12, 2015 · 0 comments
Open

VarnishQueue connect only when needed. #13

georgir opened this issue Dec 12, 2015 · 0 comments

Comments

@georgir
Copy link

georgir commented Dec 12, 2015

Currently VarnishQueue connects immediately, and keeps the connection open forever. Even if you call end() to close the client, reconnect function is bound on the client's close event so it will always keep a connection open.
One unneeded connection may not be a big deal in general, but at the very least it prevents node from exiting.
A better implementation would keep the VarnishClient disconnected while the queue is empty, and reconnect only when needed.

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