diff --git a/protocols/ping/src/handler.rs b/protocols/ping/src/handler.rs index af1ef898981..0cac23fb064 100644 --- a/protocols/ping/src/handler.rs +++ b/protocols/ping/src/handler.rs @@ -239,6 +239,10 @@ impl ConnectionHandler for Handler { SubstreamProtocol::new(ReadyUpgrade::new(PROTOCOL_NAME), ()) } + fn max_inbound_streams(&self) -> usize { + 1 // There is only ever one active inbound stream. + } + fn inject_fully_negotiated_inbound(&mut self, stream: NegotiatedSubstream, (): ()) { self.inbound = Some(protocol::recv_ping(stream).boxed()); }