Skip to content

Commit

Permalink
Don't differentiate between in and outbound connections
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaseizinger authored Oct 19, 2023
1 parent c2251ff commit a441b79
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions protocols/relay/src/behaviour/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -616,10 +616,6 @@ impl ConnectionHandler for Handler {
}

Check failure on line 616 in protocols/relay/src/behaviour/handler.rs

View workflow job for this annotation

GitHub Actions / rustfmt

Diff in /home/runner/work/rust-libp2p/rust-libp2p/protocols/relay/src/behaviour/handler.rs

fn connection_keep_alive(&self) -> KeepAlive {
// Only inbound connections need to be kept alive longer than they are active.
if self.endpoint.is_dialer() {
return KeepAlive::No;
}

match self.idle_at {
Some(idle_at) if Instant::now().duration_since(idle_at) > Duration::from_secs(10) => {
Expand Down

0 comments on commit a441b79

Please sign in to comment.