No timeout while waiting for a response
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.3k
- Forks
- 360
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 1
Description
After sending a message to the server, the client waits for a response indefinitely. The read timeout is only set after the first byte of the response is received, but if not bytes are received, then it is never set.
There's a scenario where this has a horrible impact:
- client goes to sleep
- RST/timeout is blackholed during this period.
- client wakes up, sends NOOP
- NOOP its in outbound kernel buffer
- keepalive is suspended and retransmission takes over
- retransmission keeps retrying for up to 18m
I'm sending a NOOP every three minutes precisely to detect timeouts, but Noop().Wait() simply hangs indefinitely.
Naïvely, I'd set the read timeout as soon as I'm done writing a request, but this would break IDLE, and I'm not sure if it would break anything else.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the client request/response path from the request write through Noop().Wait(), focusing on where the read timeout is currently applied. Compare this behavior with IDLE, then inspect or add coverage for a request that receives no response. Done means the client reports a timeout without disrupting IDLE behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100