Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: maidsafe/qp2p
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.24.0
Choose a base ref
...
head repository: maidsafe/qp2p
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.25.0
Choose a head ref
  • 4 commits
  • 12 files changed
  • 2 contributors

Commits on Oct 27, 2021

  1. refactor!: remove connection pooling

    This is a significant breaking change to the library's behaviour. In
    particular:
    
    - Methods on `Endpoint` to remove or fetch connections from the
      connection pool have been removed.
    - All connection-returning methods on `Endpoint` will always return a
      new connection (on success).
    - Connections are not held open automatically. If the
      `IncomingConnections` struct is dropped when creating an `Endpoint`,
      any connections handled by the endpoint will be dropped immediately
      (in future this should probably drop the underlying `quinn::Incoming`
      as well, meaning connections will be rejected outright).
    
    The upshot of this is change is that it's now necessary for callers to
    apply their own resource management for connection handles. A naive
    migration would likely lead to many more connections being made, which
    could be detrimental to performance. However, this simplifies `qp2p` and
    removes a lot of edge-cases, and is expected to be removing a lot of
    undiscovered bugs. Callers can now use a connection management strategy
    that makes the most sense for them, which is likely to be much simpler
    than the general-purpose approach that had to be taken here.
    
    BREAKING CHANGE:
    
    - The `ConnId` trait has been removed.
    - `Endpoint`, `IncomingConnections`, `Connection`, and
      `ConnectionIncoming` no longer have a generic type parameter.
    - `Endpoint::disconnect_from`, `Endpoint::get_connection_by_addr`, and
      `Endpoint::get_connection_by_id` have been removed.
    - `Connection::id` has been removed.
    - `Endpoint::new`, `Endpoint::connect_to`, and
      `Endpoint::connect_to_any` now return
      `(Connection, ConnectionIncoming)`, rather than `(Connection,
      Option<ConnectionIncoming>)`.
    - `Connection::open_bi` no longer takes a `priority` argument. This can
      be set with `SendStream::set_priority` instead.
    - Semantically, all calls to `Endpoint::connect_to` and
      `Endpoint::connect_to_any` will establish and return new connections.
      There is no connection reuse.
    Chris Connelly authored and joshuef committed Oct 27, 2021
    Configuration menu
    Copy the full SHA
    fd19094 View commit details
    Browse the repository at this point in the history
  2. fix: fix incorrect log message

    This was certainly a bad copy-paste.
    Chris Connelly authored and joshuef committed Oct 27, 2021
    Configuration menu
    Copy the full SHA
    1a9261b View commit details
    Browse the repository at this point in the history
  3. fix: drop an unused field from tests::quinn::Peer

    This was detected by the nightly compiler which ignores 'trivial'
    derives, including `Clone`, when determining if a field is unused.
    Chris Connelly authored and joshuef committed Oct 27, 2021
    Configuration menu
    Copy the full SHA
    7b0fa53 View commit details
    Browse the repository at this point in the history
  4. chore(release): 0.25.0

    actions-user authored and MaidSafe-QA committed Oct 27, 2021
    Configuration menu
    Copy the full SHA
    567e680 View commit details
    Browse the repository at this point in the history
Loading