swarm: Provide peer_id to inject_dial_failure on connection limit error (#2928)

This commit is contained in:
Darius Clark
2022-09-23 06:57:52 -04:00
committed by GitHub
parent bcff814b92
commit 121a11c7f1
3 changed files with 8 additions and 1 deletions

View File

@ -535,7 +535,7 @@ where
Ok(_connection_id) => Ok(()),
Err((connection_limit, handler)) => {
let error = DialError::ConnectionLimit(connection_limit);
self.behaviour.inject_dial_failure(None, handler, &error);
self.behaviour.inject_dial_failure(peer_id, handler, &error);
Err(error)
}
}