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

limit ping duration to 30s #1358

Merged
merged 1 commit into from
Jun 3, 2024
Merged

limit ping duration to 30s #1358

merged 1 commit into from
Jun 3, 2024

Conversation

vyzo
Copy link
Contributor

@vyzo vyzo commented Mar 14, 2022

so that ping streams cannot be squatted

Copy link
Contributor

@marten-seemann marten-seemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we ok with the stream resets this is causing? If so, should we at least fix the logging on our side?

@vyzo
Copy link
Contributor Author

vyzo commented Mar 14, 2022

What else can we do? We cant let the other side ping ad infinum and squat the resources.

What do you recommend doing about logging?

@marten-seemann
Copy link
Contributor

What else can we do? We cant let the other side ping ad infinum and squat the resources.

True. There are multiple options:

  1. We could limit the client side to the same value though, so that a well-behaved client would not run into that error. That however would require making this duration a protocol constant.
  2. Instead of resetting the stream, we could close the write side of the stream and reset the read side, and define stream closing as "normal shutdown". The client could then suppress the error when it receives the stream reset (on its write-side of the stream).
  3. Or maybe all of this is too complex and we can just live with it?

What do you recommend doing about logging?

We can special-case the deadline error, and either not log anything, or log "ping aborted after 30s" when it occurred.

@vyzo
Copy link
Contributor Author

vyzo commented Mar 14, 2022

want to take it over and mold it to suit your taste?

so that ping streams cannot be squatted
@MarcoPolo
Copy link
Collaborator

I'll carry this forward. 🫡

@MarcoPolo MarcoPolo merged commit 9ff1e70 into master Jun 3, 2024
12 checks passed
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.

None yet

3 participants