Repository navigation
12.26.2
What's Changed
Fixes
Recover silent LISTEN/NOTIFY connection drops. The dedicated listener connection could go half-open — TCP dies with no FIN and no error event — leaving notify-enabled workers silently degraded to the 30s polling backstop with no recovery. The listener now runs two independent detectors:
- TCP keepalive on the listen connection for OS-level dead-peer detection.
- Same-session heartbeat that verifies the channel subscription is still live, catching both a hung socket and a lost subscription while the socket looks fine.
On any drop it tears down, reconnects with capped backoff, re-runs LISTEN, and fires the reconnect hook so workers drain jobs missed during the gap. Works identically over SSL/TLS connections.
New options
Heartbeat and keepalive timings are now tunable via the constructor (previously hardcoded) — useful for raising the heartbeat timeout on a loaded database:
- notifyHeartbeatIntervalMs — interval between listener heartbeat checks. Default 10000.
- notifyHeartbeatTimeoutMs — per-heartbeat query timeout; the listener reconnects if a heartbeat exceeds it. Default 5000.
- notifyKeepAliveInitialDelayMs — TCP keepalive initial delay on the listener connection. Default 10000.
Defaults preserve prior behavior, so no action is needed unless you want to tune them.
New Contributors
Full Changelog: 12.26.1...12.26.2