Skip to content

ping: eliminates unnecessary ping when the connection is idle.#3381

Merged
seanmonstar merged 1 commit into
hyperium:masterfrom
HuSharp:fix_ping
Nov 2, 2023
Merged

ping: eliminates unnecessary ping when the connection is idle.#3381
seanmonstar merged 1 commit into
hyperium:masterfrom
HuSharp:fix_ping

Conversation

@HuSharp

@HuSharp HuSharp commented Nov 1, 2023

Copy link
Copy Markdown
Contributor

close #3380

rely on https://pkg.go.dev/google.golang.org/grpc/keepalive
server-side will output too many pings

Signed-off-by: husharp <jinhao.hu@pingcap.com>
@seanmonstar

Copy link
Copy Markdown
Member

I think I understand the bug. The problem is that a ping was scheduled while the connection was busy (not idle), but then streams finished, and the timer fires and wants to send a ping, but then it shouldn't send the ping. Is that right?

Have you tried out this patch in your workflow?

@HuSharp

HuSharp commented Nov 2, 2023

Copy link
Copy Markdown
Contributor Author

I think I understand the bug. The problem is that a ping was scheduled while the connection was busy (not idle), but then streams finished, and the timer fires and wants to send a ping, but then it shouldn't send the ping. Is that right?

Yes, I think this is the root cause.

Have you tried out this patch in your workflow?

Yes, I have tried this patch, and it did not meet the error too many pings while can be handled by this pr check

@seanmonstar seanmonstar merged commit 429ad8a into hyperium:master Nov 2, 2023
@HuSharp HuSharp deleted the fix_ping branch November 2, 2023 13:15
0xE282B0 pushed a commit to 0xE282B0/hyper that referenced this pull request Jan 12, 2024
Signed-off-by: husharp <jinhao.hu@pingcap.com>
0xE282B0 pushed a commit to 0xE282B0/hyper that referenced this pull request Jan 16, 2024
Signed-off-by: husharp <jinhao.hu@pingcap.com>
Signed-off-by: Sven Pfennig <s.pfennig@reply.de>
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.

eliminates unnecessary ping when the connection is idle

2 participants