Skip to content

fix: stop processing queries after a TCP client disconnects - #494

Open
Tpt wants to merge 1 commit into
sunng87:masterfrom
Tpt:tpt/dropped-connection
Open

Tpt wants to merge 1 commit into
sunng87:masterfrom
Tpt:tpt/dropped-connection

Conversation

@Tpt

@Tpt Tpt commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

The server does not read from the socket while processing a query. A long-running query can keep running after its client disconnects, until it tries to send a result.

Watch a clone of the underlying TCP socket in parallel with message processing. When the socket reports that its read side has closed, drop the connection-processing future and any active result stream. This also covers TLS connections over TCP.

The server does not read from the socket while processing a query.
A long-running query can keep running after its client disconnects,
until it tries to send a result.

Watch a clone of the underlying TCP socket in parallel with message
processing. When the socket reports that its read side has closed,
drop the connection-processing future and any active result stream.
This also covers TLS connections over TCP.
@Tpt
Tpt marked this pull request as ready for review November 25, 2026 14:56
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