mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-16 19:41:22 +00:00
Always store open frames to internal buffer. (#319)
This commit is contained in:
committed by
Pierre Krieger
parent
b423e9fe8c
commit
cbc845d345
@ -23,7 +23,6 @@ extern crate fnv;
|
||||
#[macro_use]
|
||||
extern crate futures;
|
||||
extern crate libp2p_core as core;
|
||||
extern crate log;
|
||||
extern crate parking_lot;
|
||||
extern crate tokio_codec;
|
||||
extern crate tokio_io;
|
||||
@ -154,7 +153,7 @@ where C: AsyncRead + AsyncWrite,
|
||||
return Err(IoError::new(IoErrorKind::InvalidData, "reached maximum buffer length"));
|
||||
}
|
||||
|
||||
if inner.opened_substreams.contains(&elem.substream_id()) {
|
||||
if inner.opened_substreams.contains(&elem.substream_id()) || elem.is_open_msg() {
|
||||
inner.buffer.push(elem);
|
||||
for task in inner.to_notify.drain(..) {
|
||||
task.notify();
|
||||
|
Reference in New Issue
Block a user