Don't print dozens of the times the handler init warning (#2089)

This commit is contained in:
Pierre Krieger
2019-03-23 12:44:35 +01:00
committed by André Silva
parent 90d3fe8913
commit 418edcfbac
@@ -488,9 +488,11 @@ where
ProtocolState::Init { substreams, mut init_deadline } => {
match init_deadline.poll() {
Ok(Async::Ready(())) =>
Ok(Async::Ready(())) => {
init_deadline.reset(Instant::now() + Duration::from_secs(60));
error!(target: "sub-libp2p", "Handler initialization process is too long \
with {:?}", self.remote_peer_id),
with {:?}", self.remote_peer_id)
},
Ok(Async::NotReady) => {}
Err(_) => error!(target: "sub-libp2p", "Tokio timer has errored")
}