fixes for muxed_conn interface and usage of self.buffers over self.stream
This commit is contained in:
parent
592ef69d8d
commit
6c99d854dd
|
@ -68,7 +68,7 @@ class MplexStream(IMuxedStream):
|
||||||
|
|
||||||
if remote_lock:
|
if remote_lock:
|
||||||
async with self.mplex_conn.conn_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
|
return True
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ class MplexStream(IMuxedStream):
|
||||||
self.remote_closed = True
|
self.remote_closed = True
|
||||||
|
|
||||||
async with self.mplex_conn.conn_lock:
|
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
|
return True
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ class IMuxedConn(ABC):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@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
|
creates a new muxed_stream
|
||||||
:param protocol_id: protocol_id of stream
|
:param protocol_id: protocol_id of stream
|
||||||
|
|
Loading…
Reference in New Issue
Block a user