Skip to content

Commit

Permalink
Disable RequestResponse::throttled. (#1711)
Browse files Browse the repository at this point in the history
Can be enabled again after #1706 is resolved.

Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
  • Loading branch information
twittner and romanb authored Aug 18, 2020
1 parent e1df920 commit b4ad2d6
Show file tree
Hide file tree
Showing 3 changed files with 207 additions and 205 deletions.
3 changes: 0 additions & 3 deletions protocols/request-response/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

- Fixed connection keep-alive, permitting connections to close due
to inactivity.
- Added `RequestResponse::throttled` to wrap the behaviour into one that
enforces limits on inbound and outbound requests per peer. The limits
have to be known upfront by all nodes.
- Bump `libp2p-core` and `libp2p-swarm` dependencies.

# 0.1.1
Expand Down
15 changes: 9 additions & 6 deletions protocols/request-response/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,13 @@

pub mod codec;
pub mod handler;
pub mod throttled;

// Disabled until #1706 is fixed:
// pub mod throttled;
// pub use throttled::Throttled;

pub use codec::{RequestResponseCodec, ProtocolName};
pub use handler::ProtocolSupport;
pub use throttled::Throttled;

use futures::{
channel::oneshot,
Expand Down Expand Up @@ -311,10 +313,11 @@ where
}
}

/// Wrap this behaviour in [`Throttled`] to limit the number of concurrent requests per peer.
pub fn throttled(self) -> Throttled<TCodec> {
Throttled::new(self)
}
// Disabled until #1706 is fixed.
// /// Wrap this behaviour in [`Throttled`] to limit the number of concurrent requests per peer.
// pub fn throttled(self) -> Throttled<TCodec> {
// Throttled::new(self)
// }

/// Initiates sending a request.
///
Expand Down
Loading

0 comments on commit b4ad2d6

Please sign in to comment.