Improve control on close reason
- Dominant language
- Go
- Stars
- 5.5k
- Forks
- 372
- PR merge metrics
- No merged PRs in 30d
Description
What's the intended usage pattern of the Reader and Writer context w.r.t. closing the connection from the server side?
It seems like the connection is closed automatically by the reader / writer when the context is cancelled. However, I don't have any way of impacting the status and reason for that close within the reader / writer.
Is the intention that the user of the reader / writer closes the connection with the status and reason they want and let the writer / reader return?
Another option could be that this package would support influencing the close status and reason via an error provided as context cancellation cause.
WDYT?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how the Reader and Writer handle context cancellation and how callers currently close the server-side connection. Compare the proposed cancellation-cause approach with explicitly closing the connection, then define the intended close status and reason behavior before identifying tests for both paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100