PgPubSub.on() method

Sets 'close' event handler

Signature:

on(event: 'close', listener: typeof close): this;

Parameters

Parameter

Type

Description

event

'close'

'close' — the connection was closed by close(), leaving it re-usable

listener

typeof close

handler invoked when the connection was closed by close(), leaving it re-usable.

Returns:

this

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.