Files
bun.sh/test/js/sql
Claude Bot 12bc09718c fix(sql): allow process to exit when PostgreSQL connection is idle
Previously, idle PostgreSQL connections would keep the Bun process alive
indefinitely after queries completed. This happened because `updateRef()`
always kept the poll reference when `pending_activity_count > 0`, which
includes any non-disconnected connection status.

This fix modifies `updateRef()` to unref the poll when the connection is
idle (connected with no pending queries and no data to write), matching
Node.js behavior where idle database connections allow the process to exit.

Fixes #3548

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 01:08:55 +00:00
..
2025-08-19 23:15:53 -07:00
2025-05-08 18:51:32 -07:00
2025-08-01 22:41:05 -07:00