Skip to content

Close channel after inbound errors - #760

Open
ean5533 wants to merge 1 commit into
pgjdbc:mainfrom
ean5533:gh-759
Open

ean5533 wants to merge 1 commit into
pgjdbc:mainfrom
ean5533:gh-759

Conversation

@ean5533

@ean5533 ean5533 commented Oct 29, 2026

Copy link
Copy Markdown
  • You have read the contribution guidelines.
  • You have created a feature request first to discuss your contribution intent. Please reference the feature request ticket number in the pull request.
  • You use the code formatters provided here and have them applied to your changes. Don't submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.

Issue description

Closes #759.

inboundErrorShouldCloseChannel in ReactorNettyClientIntegrationTests fails without the change. ./mvnw clean verify passes, including integration tests.

New Public APIs

None.

Additional context

I used AI heavily to assist in investigation of this issue and curating my findings; however, I am a real human submitting this PR.

After an inbound error, `handleClose()` marks the client closed before
`close()` runs, so `close()` returned without sending `Terminate` or
disposing the connection. The channel stayed open and the server kept
the backend and its transaction. Dispose the connection whenever the
channel is still open, and after `Terminate` whether or not the write
succeeded.

[resolves pgjdbc#759]
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.

Channel stays open after an inbound error such as ResponseQueueException

1 participant