Skip to content

feat(ws): detect websocket disconnects promptly#26

Merged
taigrr merged 2 commits into
masterfrom
cd/websocket-read-pump-and-level-stringer
May 11, 2026
Merged

feat(ws): detect websocket disconnects promptly#26
taigrr merged 2 commits into
masterfrom
cd/websocket-read-pump-and-level-stringer

Conversation

@taigrr
Copy link
Copy Markdown
Owner

@taigrr taigrr commented May 1, 2026

Summary

  • add a websocket read pump so disconnects cancel the stream promptly instead of waiting for the next write failure
  • add Client.GetContext(ctx) for context-aware blocking reads in websocket streaming
  • implement Level.String() and cover the new behavior with tests

Testing

  • go test -race ./...
  • staticcheck ./...

taigrr added 2 commits April 7, 2026 10:08
…tring

- Add WebSocket read pump in LogSocketHandler so client disconnects are
  detected promptly instead of only on the next WriteMessage call
- Add Client.GetContext(ctx) for context-aware blocking reads
- Implement fmt.Stringer on Level type (Level.String())
- Add tests for GetContext, GetContext cancellation, and Level.String()
@taigrr taigrr merged commit 728e996 into master May 11, 2026
1 check passed
@taigrr taigrr deleted the cd/websocket-read-pump-and-level-stringer branch May 11, 2026 15:03
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