mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 04:41:02 +00:00
Split Peerset into PeerStore & ProtocolControllers (#13611)
This commit is contained in:
@@ -307,8 +307,20 @@ fn reconnect_after_disconnect() {
|
||||
_ => {},
|
||||
}
|
||||
|
||||
// Due to the bug in `Notifications`, the disconnected node does not always detect that
|
||||
// it was disconnected. The closed inbound substream is tolerated by design, and the
|
||||
// closed outbound substream is not detected until something is sent into it.
|
||||
// See [PR #13396](https://github.com/paritytech/substrate/pull/13396).
|
||||
// This happens if the disconnecting node reconnects to it fast enough.
|
||||
// In this case the disconnected node does not transit via `ServiceState::NotConnected`
|
||||
// and stays in `ServiceState::FirstConnec`.
|
||||
// TODO: update this once the fix is finally merged.
|
||||
if service1_state == ServiceState::ConnectedAgain &&
|
||||
service2_state == ServiceState::ConnectedAgain
|
||||
service2_state == ServiceState::ConnectedAgain ||
|
||||
service1_state == ServiceState::ConnectedAgain &&
|
||||
service2_state == ServiceState::FirstConnec ||
|
||||
service1_state == ServiceState::FirstConnec &&
|
||||
service2_state == ServiceState::ConnectedAgain
|
||||
{
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user