Skip to content

Await deferred database cleanup and deliver dispatch failures - #138

Open
RichardHoekstra wants to merge 1 commit into
WebHare:mainfrom
RichardHoekstra:github/fix/deferred-database-cleanup
Open

RichardHoekstra wants to merge 1 commit into
WebHare:mainfrom
RichardHoekstra:github/fix/deferred-database-cleanup

Conversation

@RichardHoekstra

Copy link
Copy Markdown
Contributor

Problem

Closing a still-opening database connection returns before cleanup finishes. Opening failure can leave a detached rejection, and deferred dispatch failure can miss its caller.

Change

  • Await opening and actual client-close acknowledgement.
  • Deliver deferred acquisition/dispatch failures through the existing callback.
  • Preserve a callback's own exception without invoking it twice.

Validation

system.nodejs.test_connectionclose fails before and passes after. Four cases cover pending close acknowledgement, opening failure, deferred dispatch failure and a throwing callback.

Selected compatibility, TypeScript and unchanged ESLint checks pass. Validated on the official 6.2 image for GitHub main a91a7a28, with the candidate sources installed. Full upstream CI has not been run.

This branch was successfully deployed

1 active deployment
external-ci — 586f7409 Deployed Oct 27, 2026 by RichardHoekstra via setup #201
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant