Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix server-side timeout handling #210

Merged
merged 5 commits into from
May 14, 2022
Merged

Fix server-side timeout handling #210

merged 5 commits into from
May 14, 2022

Conversation

akshayjshah
Copy link
Member

Now that we've defined the Connect protocol, we can simplify the protocol
interfaces: content-type negotiation is simpler, so the interface gets smaller.
This is also an easy moment to fix a bug in server-side timeout handling.

We're parsing timeouts, but not properly propagating them into user
code. Thanks, crosstests!
Since we know the shape of the Connect protocol, we can simplify the
protocol interfaces and move some shared utility functions into
`protocol.go`. This also fixes server-side timeout handling.
@akshayjshah akshayjshah requested a review from doriable May 12, 2022 21:57
We're only doing this at startup, so it's okay to make it slow. The code
doesn't get much shorter, but it's arguably more readable.
Move the literal for our discard limit into a constant.
@akshayjshah akshayjshah merged commit 316a3a0 into main May 14, 2022
@akshayjshah akshayjshah deleted the ajs/protocol branch May 14, 2022 16:50
akshayjshah added a commit that referenced this pull request Jul 26, 2023
* Add test for unary RPC with zero-byte messages

* Add failing test for handler timeout handling

We're parsing timeouts, but not properly propagating them into user
code. Thanks, crosstests!

* Fix timeout handling

Since we know the shape of the Connect protocol, we can simplify the
protocol interfaces and move some shared utility functions into
`protocol.go`. This also fixes server-side timeout handling.

* Keep Accept-Post string manipulation shorter

We're only doing this at startup, so it's okay to make it slow. The code
doesn't get much shorter, but it's arguably more readable.

* Add indirection to constant limit

Move the literal for our discard limit into a constant.
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.

3 participants