mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-11 09:01:22 +00:00
Be lenient with duplicate Close frames. (#1816)
This commit is contained in:
@ -1,3 +1,12 @@
|
||||
# 0.23.1 [2020-10-28]
|
||||
|
||||
- Be lenient with duplicate `Close` frames received. Version
|
||||
`0.23.0` started treating duplicate `Close` frames for a
|
||||
substream as a protocol violation. As some libp2p implementations
|
||||
seem to occasionally send such frames and it is a harmless
|
||||
redundancy, this releases reverts back to the pre-0.23 behaviour
|
||||
of ignoring duplicate `Close` frames.
|
||||
|
||||
# 0.23.0 [2020-10-16]
|
||||
|
||||
- More granular execution of pending flushes, better logging and
|
||||
|
@ -2,7 +2,7 @@
|
||||
name = "libp2p-mplex"
|
||||
edition = "2018"
|
||||
description = "Mplex multiplexing protocol for libp2p"
|
||||
version = "0.23.0"
|
||||
version = "0.23.1"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
license = "MIT"
|
||||
repository = "https://github.com/libp2p/rust-libp2p"
|
||||
|
@ -666,11 +666,9 @@ where
|
||||
if let Some(state) = self.substreams.remove(&id) {
|
||||
match state {
|
||||
SubstreamState::RecvClosed { .. } | SubstreamState::Closed { .. } => {
|
||||
debug!("{}: Received unexpected `Close` frame for closed substream {}",
|
||||
debug!("{}: Ignoring `Close` frame for closed substream {}",
|
||||
self.id, id);
|
||||
return self.on_error(
|
||||
io::Error::new(io::ErrorKind::Other,
|
||||
"Protocol error: Received `Close` frame for closed substream."))
|
||||
self.substreams.insert(id, state);
|
||||
},
|
||||
SubstreamState::Reset { buf } => {
|
||||
debug!("{}: Ignoring `Close` frame for already reset substream {}",
|
||||
|
Reference in New Issue
Block a user