fixes for muxed_conn interface and usage of self.buffers over self.stream

This commit is contained in:
Robert Zajac 2018-11-25 15:27:54 -05:00
parent 592ef69d8d
commit 6c99d854dd
2 changed files with 3 additions and 3 deletions

View File

@ -68,7 +68,7 @@ class MplexStream(IMuxedStream):
if remote_lock:
async with self.mplex_conn.conn_lock:
self.mplex_conn.streams.pop(self.stream_id)
self.mplex_conn.buffers.pop(self.stream_id)
return True
@ -91,7 +91,7 @@ class MplexStream(IMuxedStream):
self.remote_closed = True
async with self.mplex_conn.conn_lock:
self.mplex_conn.streams.pop(self.stream_id, None)
self.mplex_conn.buffers.pop(self.stream_id, None)
return True

View File

@ -23,7 +23,7 @@ class IMuxedConn(ABC):
pass
@abstractmethod
def open_stream(self, protocol_id, stream_id, peer_id, multi_addr):
def open_stream(self, protocol_id, peer_id, multi_addr):
"""
creates a new muxed_stream
:param protocol_id: protocol_id of stream