Closed
Description
Calling client.end()
on a Client
not connected in pg@7.17.1
fails with an error message
Socket is closed
However in pg@7.18.1
the same call just hangs indefinitely. I'm using the promise-based call (without the callback) and await
ing the promise to fulfil.
Is this an expected change?
If the context matters, I have a wrapper around a Client
and I'm "unit testing" that a call to its closing function throws if the wrapped client is not connected. Before I was just calling .end()
on the inner client but now the test fails since the promise never fulfilled.
If the change is expected, is there a way of knowing if a given Client
is connected?
Metadata
Metadata
Assignees
Labels
No labels