mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-04-25 19:02:13 +00:00
Fix connection keep-alive for request-response. (#1700)
This commit is contained in:
parent
7d47ada077
commit
96484fcd5e
@ -1,5 +1,7 @@
|
|||||||
# 0.2.0 // unreleased
|
# 0.2.0 // unreleased
|
||||||
|
|
||||||
|
- Fixed connection keep-alive, permitting connections to close due
|
||||||
|
to inactivity.
|
||||||
- Added `RequestResponse::throttled` to wrap the behaviour into one that
|
- Added `RequestResponse::throttled` to wrap the behaviour into one that
|
||||||
enforces limits on inbound and outbound requests per peer. The limits
|
enforces limits on inbound and outbound requests per peer. The limits
|
||||||
have to be known upfront by all nodes.
|
have to be known upfront by all nodes.
|
||||||
|
@ -313,7 +313,7 @@ where
|
|||||||
self.outbound.shrink_to_fit();
|
self.outbound.shrink_to_fit();
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.inbound.is_empty() {
|
if self.inbound.is_empty() && self.keep_alive.is_yes() {
|
||||||
// No new inbound or outbound requests. However, we may just have
|
// No new inbound or outbound requests. However, we may just have
|
||||||
// started the latest inbound or outbound upgrade(s), so make sure
|
// started the latest inbound or outbound upgrade(s), so make sure
|
||||||
// the keep-alive timeout is preceded by the substream timeout.
|
// the keep-alive timeout is preceded by the substream timeout.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user