Always store open frames to internal buffer. (#319)

This commit is contained in:
Toralf Wittner
2018-07-18 12:35:37 +02:00
committed by Pierre Krieger
parent b423e9fe8c
commit cbc845d345
3 changed files with 9 additions and 10 deletions

View File

@ -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();