Skip to content

Preserve notifications during client connection reuse - #165

Merged
svenvc merged 1 commit into
svenvc:masterfrom
Gabriel-Darbord:fix/client-reuse-notifications
Oct 26, 2026
Merged

svenvc merged 1 commit into
svenvc:masterfrom
Gabriel-Darbord:fix/client-reuse-notifications

Conversation

@Gabriel-Darbord

@Gabriel-Darbord Gabriel-Darbord commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

A caller deadline around a request on a reused keep-alive connection can be swallowed: TimedOut is a Notification, and getConnectionAndExecute catches every Exception and starts a fresh request. The call can then return successfully after its caller's deadline. Resumable notifications are also intercepted and needlessly discard the connection.

Restrict that recovery handler to Error. Ordinary read/network errors keep the existing fresh-connection fallback; notifications reach the caller and can resume normally. The configured retry exception set and retry count are unchanged.

Add three local-server regressions covering caller cancellation, resumable notification propagation on the same connection, and recovery from an injected read error. The timeout and resumable-notification cases fail with the original handler; all three pass with the fix. The timeout regression uses the portable Duration-based API.

@Gabriel-Darbord
Gabriel-Darbord force-pushed the fix/client-reuse-notifications branch from adb7211 to b2417bb Compare October 26, 2026 12:42
@svenvc

svenvc commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Interesting ! Looks great to me.

Thanks!

@svenvc
svenvc merged commit 782edf7 into svenvc:master Oct 26, 2026
6 checks passed
@Gabriel-Darbord
Gabriel-Darbord deleted the fix/client-reuse-notifications branch October 26, 2026 13:28
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.

2 participants