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!: close streams gracefully #1868

Closed

Commits on Jul 3, 2023

  1. fix!: close streams gracefully

    - Refactors `.close`, `closeRead` and `.closeWrite` methods on the `Stream` interface to be async
    - The `Connection` interface now has `.close` and `.abort` methods
    - `.close` on `Stream`s and `Connection`s wait for the internal message queues to empty before closing
    - `.abort` on `Stream`s and `Connection`s close the underlying stream immediately and discards any unsent data
    - `@chainsafe/libp2p-yamux` now uses the `AbstractStream` class from `@libp2p/interface` the same as `@libp2p/mplex` and
    `@libp2p/webrtc`
    
    Follow-up PRs will be necessary to `@chainsafe/libp2p-yamux`, `@chainsafe/libp2p-gossipsub` and `@chainsafe/libp2p-noise`
    though they will not block the release as their code is temporarily added to this repo to let CI run.
    
    Fixes #1793
    Fixes #656
    
    BREAKING CHANGE: the `.close`, `closeRead` and `closeWrite` methods on the `Stream` interface are now asynchronous
    achingbrain committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    ff1c673 View commit details
    Browse the repository at this point in the history
  2. chore: fix hanging test

    achingbrain committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    08a3e06 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0d1d604 View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2023

  1. chore: fix tests

    achingbrain committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    2afdee1 View commit details
    Browse the repository at this point in the history
  2. chore: fix comment

    achingbrain committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    d4025a6 View commit details
    Browse the repository at this point in the history
  3. chore: speed up shutdown

    achingbrain committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    6ab0191 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9b35a0b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2dc9026 View commit details
    Browse the repository at this point in the history
  6. chore: debug interop

    achingbrain committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    126791e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f267100 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2023

  1. Configuration menu
    Copy the full SHA
    4759f62 View commit details
    Browse the repository at this point in the history
  2. chore: log incoming ping

    achingbrain committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    87bec2c View commit details
    Browse the repository at this point in the history