Skip to content

Commit

Permalink
Disable RequestResponse::throttled.
Browse files Browse the repository at this point in the history
Can be enabled again after libp2p#1706 is resolved.
  • Loading branch information
twittner committed Aug 18, 2020
1 parent 269a2ac commit ee081f6
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 ee081f6

Please sign in to comment.