mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Merge branch 'master' into feature/porting-to-trio
This commit is contained in:
@ -170,8 +170,7 @@ class MplexStream(IMuxedStream):
|
||||
if _is_remote_closed:
|
||||
# Both sides are closed, we can safely remove the buffer from the dict.
|
||||
async with self.muxed_conn.streams_lock:
|
||||
if self.stream_id in self.muxed_conn.streams:
|
||||
del self.muxed_conn.streams[self.stream_id]
|
||||
self.muxed_conn.streams.pop(self.stream_id, None)
|
||||
|
||||
async def reset(self) -> None:
|
||||
"""closes both ends of the stream tells this remote side to hang up."""
|
||||
@ -199,11 +198,8 @@ class MplexStream(IMuxedStream):
|
||||
await self.incoming_data_channel.aclose()
|
||||
|
||||
async with self.muxed_conn.streams_lock:
|
||||
if (
|
||||
self.muxed_conn.streams is not None
|
||||
and self.stream_id in self.muxed_conn.streams
|
||||
):
|
||||
del self.muxed_conn.streams[self.stream_id]
|
||||
if self.muxed_conn.streams is not None:
|
||||
self.muxed_conn.streams.pop(self.stream_id, None)
|
||||
|
||||
# TODO deadline not in use
|
||||
def set_deadline(self, ttl: int) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user