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

feat: add connection monitor #2644

Merged
merged 5 commits into from
Aug 14, 2024
Merged

feat: add connection monitor #2644

merged 5 commits into from
Aug 14, 2024

Commits on Jul 31, 2024

  1. feat: add connection monitor

    Adds a connection monitor that periodically ensures remote peers are
    still online and contactable by trying to send a single byte via the
    ping protocol, and sets the `.rtt` property of the connection to how
    long it took.
    
    If the ping protocol is not supported by the remote, it tries to infer
    the round trip time by how long it took to fail.
    
    If the remote is unresponsive or opening the stream fails for any
    other reason, the connection is aborted with the throw error.
    
    It's possible to configure the ping interval, how long we wait before
    considering a peer to be inactive and whether or not to close the
    connection on failure.
    
    Closes #2643
    achingbrain committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    fa84233 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d0e50a5 View commit details
    Browse the repository at this point in the history
  3. chore: add missing deps

    achingbrain committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    6141c86 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2024

  1. chore: apply suggestions from code review

    Co-authored-by: Chad Nehemiah <chad.nehemiah94@gmail.com>
    achingbrain and maschad authored Aug 9, 2024
    Configuration menu
    Copy the full SHA
    978e221 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f3221ce View commit details
    Browse the repository at this point in the history