Skip to content

Fix writePump shutdown path to avoid early context exit#33

Merged
KARTIKrocks merged 2 commits into
mainfrom
fix/writepump-shutdown-drain
May 11, 2026
Merged

Fix writePump shutdown path to avoid early context exit#33
KARTIKrocks merged 2 commits into
mainfrom
fix/writepump-shutdown-drain

Conversation

@KARTIKrocks
Copy link
Copy Markdown
Owner

Summary

  • Remove hub context cancellation from writePump
  • Let writer shutdown flow through client.send / client.done so queued messages and close frames get a chance to flush
  • Add focused tests for CloseWithCode, remote close, hub shutdown, and buffered sends before close
  • Add changelog entry for v1.5.1

Test Plan

  • make all passes (fmt, vet, lint, test, build)
  • - go test -run 'TestWritePumpExitsOnCloseWithCode|TestWritePumpExitsOnRemoteClose|TestWritePumpExitsOnHubShutdown|TestWritePumpDeliversBufferedSendsBeforeClose'

Checklist

  • Tests added or updated for changed behavior
  • No breaking changes — or breaking changes described below

Breaking Changes

@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@KARTIKrocks KARTIKrocks merged commit 659d226 into main May 11, 2026
11 checks passed
@KARTIKrocks KARTIKrocks deleted the fix/writepump-shutdown-drain branch May 11, 2026 03:45
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