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

fix: make handshake abortable #442

Merged
merged 1 commit into from
Aug 29, 2024
Merged

Commits on Aug 14, 2024

  1. fix: make handshake abortable

    To allow doing things like having a single `AbortSignal` that can be
    used as a timeout for incoming connection establishment, allow passing
    it as an option to the `ConnectionEncrypter` `secureOutbound` and
    `secureInbound` methods.
    
    Previously we'd wrap the stream to be secured in an `AbortableSource`,
    however this has some [serious performance implications](ChainSafe/js-libp2p-gossipsub#361)
    and it's generally better to just use a signal to cancel an ongoing
    operation instead of racing every chunk that comes out of the source.
    achingbrain committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    6a68f32 View commit details
    Browse the repository at this point in the history