Closed lexnv closed 4 months ago
We have discovered a race between the TransportService and Protocol interface.
This issue was first seen on the identify protocol:
After looking a bit closely into it, indeed there might be a chance for the following to happen:
TransportEvent::ConnectionEstablished
TransportEvent::SubstreamOpened
Ping::on_connection_established
pending_open
This PR replaces the todo! in case of the race with a warning, and we'll no longer panic.
todo!
It is still good to capture those as warnings for visibility, even if there's no implied side-effect on our code.
We have discovered a race between the TransportService and Protocol interface.
This issue was first seen on the identify protocol:
After looking a bit closely into it, indeed there might be a chance for the following to happen:
TransportEvent::ConnectionEstablished
andTransportEvent::SubstreamOpened
TransportEvent::ConnectionEstablished
event for a disconnected peerPing::on_connection_established
fails to open a substream andpending_open
is never populatedTransportEvent::SubstreamOpened
event which would have panicked litep2pThis PR replaces the
todo!
in case of the race with a warning, and we'll no longer panic.It is still good to capture those as warnings for visibility, even if there's no implied side-effect on our code.