feat(ping): making the ignoring of the first error configurable
Description
Fix #5004
Notes & open questions
Instead of using a silent_first_error: bool, we could also use a ignored_errors_nb: usize. However, since there was previously a self.config.max_failures and it was removed, I did not re-do it. Of course, if it is preferred I can do it.
Change checklist
- [x] I have performed a self-review of my own code
- [x] I have made corresponding changes to the documentation
- [ ] I have added tests that prove my fix is effective or that my feature works
- [x] A changelog entry has been made in the appropriate crates
@mxinden What do you think? Do you have any historical knowledge on this?
No historical knowledge beyond what is posted above. I am fine with either direction. Preference for no additional config flag if possible.
@mxinden What do you think? Do you have any historical knowledge on this?
No historical knowledge beyond what is posted above. I am fine with either direction. Preference for no additional config flag if possible.
Okay thank you! Re-reading the spec, I think it is safe to move away from a long-lived stream and instead only ever send a single ping and close the stream afterwards. @stormshield-frb Would you mind re-writing this PR to do that? I think that should also solve #5004.
About moving away from long-lived stream, will it not be a costly to open and close streams with TCP or Yamux for example ? I understand that it is almost free with QUIC but unfortunately it is not the case with every transports. What do you think about it ?
About moving away from long-lived stream, will it not be a costly to open and close streams with
TCPorYamuxfor example ? I understand that it is almost free withQUICbut unfortunately it is not the case with every transports. What do you think about it ?
Yamux streams are similarly cheap to QUIC streams! :)
This pull request has merge conflicts. Could you please resolve them @stormshield-frb? 🙏