mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-29 01:31:33 +00:00
feat(request-response): don't close connection on stream errors
Related: #3591. Pull-Request: #3913.
This commit is contained in:
@ -13,4 +13,5 @@ either = "1.8"
|
||||
env_logger = "0.10"
|
||||
futures = "0.3.28"
|
||||
libp2p = { path = "../../libp2p", features = ["async-std", "dns", "kad", "noise", "macros", "request-response", "tcp", "websocket", "yamux"] }
|
||||
multiaddr = { version = "0.17.1" }
|
||||
multiaddr = { version = "0.17.1" }
|
||||
void = "1.0.2"
|
||||
|
@ -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(
|
||||
|
Reference in New Issue
Block a user