diff --git a/protocols/request-response/CHANGELOG.md b/protocols/request-response/CHANGELOG.md index 959887d41b2..e26d112f545 100644 --- a/protocols/request-response/CHANGELOG.md +++ b/protocols/request-response/CHANGELOG.md @@ -1,5 +1,7 @@ # 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 enforces limits on inbound and outbound requests per peer. The limits have to be known upfront by all nodes. diff --git a/protocols/request-response/src/handler.rs b/protocols/request-response/src/handler.rs index b78e19fccf3..57dcef8184c 100644 --- a/protocols/request-response/src/handler.rs +++ b/protocols/request-response/src/handler.rs @@ -313,7 +313,7 @@ where 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 // started the latest inbound or outbound upgrade(s), so make sure // the keep-alive timeout is preceded by the substream timeout.