Skip to content

VarnishQueue connect only when needed. #13

@georgir

Description

@georgir

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions