- Notifications
You must be signed in to change notification settings - Fork 325
Open
Description
I have this code:
try { await pg.unsafe("My query"); } catch (e) { // whatever }The connection is inmediately lost as a test that I have is to close the server socket just when the query starts, so I'm receiving an Error: read ECONNRESET in the catch.
But when I try to end the connection, it lasts forever:
await pg.end();I went into the code and what I found is that a connection has a rejected query associated, so it just waits for it to finish, but it is already finished, so it waits forever:
Obviously I don't want to add a timeout to the end callback as a workaround. All resources should be cleaned properly.
WeironUS
Metadata
Metadata
Assignees
Labels
No labels