Skip to content

Check pg connection  #458

Closed
Closed
@Laboratory

Description

@Laboratory

Hey,

How can I check pg (client|connection) connection for reconnect to DB?
My work flow:

  • create pg.Client (ok)
  • client.query (ok)
  • turn off internet connection (ok)
  • client.query (wait indefinitely) (fail)
  • turn on internet connection (ok)
  • client.query (wait indefinitely) (fail)

All my handlers are silent (client.on('end'), client.connection.on('error'), client.connection.stream.on('end'), client.connection.stream.on('error'), ...)

Thx, Vitaly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions