gun
gun copied to clipboard
Add keepalive_tolerance http2 option
keepalive_tolerance
: The number of unacknowledged pings that can be tolerated
before the connection is forcefully closed.
When a keepalive ping is sent to the peer, a counter is incremented and if this counter exceeds the tolerance limit, the connection is forcefully closed. The counter is reset whenever a ping ack is received from the peer.
By default, the mechanism for closing the connection based on ping and ping ack is disabled.
As discussed in #254.
Test not yet added.
Please check if you think this feature makes sense. Then I'll add a test case.
Please try to avoid these merge commits [Merge remote-tracking branch 'origin/master' into keepalive_tolerance] they make things much harder for me to merge afterwards. git pull --rebase origin master
is the way to go (where origin
is this repository, on my machine it's named upstream
).
OK, I'll revert the merge and do a rebase instead. (Some projects prefer merge instead of force-push since it makes it easier to see what's already reviewed and what's new.)
No merge commit now. However, I squashed all the commits before rebasing, since otherwise I got multiple intermediate merge conflicts when rebasing.
No problem, thanks.
I see that most 2.0 tagged PRs have been merged now. Any chance this one can make it to 2.0?
If not, would you prefer adding an idle_timeout
instead?
Merged with many tweaks, even went back on some things I said before. Thanks!
Hey, there's some issues in the tests for this on macOS and Windows. Can you please take a look? If you open a PR it'll run the tests again.
It looks like a timing issue. If something is lagging by 50ms, the gun_down
comes too early.
The simplest solution would be to increase the times, making the test take longer to run. Perhaps by a factor 10. Do you have a better idea?
This is from one of the latest mac builds on master:
If it's a timing issue then yes increasing would be fine for the time being. But it's a bit surprising because macOS tends to be the fastest to run tests and have the least amount of issues from it.
OK, here's a boring PR increasing the timeouts 10 times: #309. Let's see if all builds pass.
Are you in control of the mac machines? Maybe they were temporarily heavily loaded or something....
It's possible for Windows since it's a VM on my (beefy) gaming PC. But macOS is CI-only. I'm in control of all machines so if it's not something trivial I'll be able to take a closer look next week.