mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-12 17:41:22 +00:00
fix(gossipsub): gracefully disable handler on stream errors
Previously, we closed the entire connection upon receiving too many upgrade errors. This is unnecessarily aggressive. For example, an upgrade error may be caused by the remote dropping a stream during the initial handshake which is completely isolated from other protocols running on the same connection. Instead of closing the connection, set `KeepAlive::No`. Related: #3591. Resolves: #3690. Pull-Request: #3625.
This commit is contained in:
@ -158,9 +158,12 @@ mod types;
|
||||
|
||||
mod rpc_proto;
|
||||
|
||||
#[deprecated(note = "This error will no longer be emitted")]
|
||||
pub type HandlerError = error_priv::HandlerError;
|
||||
|
||||
pub use self::behaviour::{Behaviour, Event, MessageAuthenticity};
|
||||
pub use self::config::{Config, ConfigBuilder, ValidationMode, Version};
|
||||
pub use self::error_priv::{HandlerError, PublishError, SubscriptionError, ValidationError};
|
||||
pub use self::error_priv::{PublishError, SubscriptionError, ValidationError};
|
||||
pub use self::peer_score::{
|
||||
score_parameter_decay, score_parameter_decay_with_base, PeerScoreParams, PeerScoreThresholds,
|
||||
TopicScoreParams,
|
||||
|
Reference in New Issue
Block a user