feat(request-response): don't close connection on stream errors

Related: #3591.

Pull-Request: #3913.
This commit is contained in:
Thomas Eizinger
2023-05-15 04:40:55 +02:00
committed by GitHub
parent 8c00dc9680
commit 1742bffcea
6 changed files with 23 additions and 20 deletions

View File

@ -16,7 +16,7 @@ use libp2p::{
multiaddr::Protocol,
noise,
request_response::{self, ProtocolSupport, RequestId, ResponseChannel},
swarm::{NetworkBehaviour, StreamUpgradeError, Swarm, SwarmBuilder, SwarmEvent},
swarm::{NetworkBehaviour, Swarm, SwarmBuilder, SwarmEvent},
tcp, yamux, PeerId, Transport,
};
@ -216,7 +216,7 @@ impl EventLoop {
async fn handle_event(
&mut self,
event: SwarmEvent<ComposedEvent, Either<StreamUpgradeError<io::Error>, io::Error>>,
event: SwarmEvent<ComposedEvent, Either<void::Void, io::Error>>,
) {
match event {
SwarmEvent::Behaviour(ComposedEvent::Kademlia(