mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
Fix close behavior
This commit is contained in:
@ -188,6 +188,10 @@ class Mplex(IMuxedConn):
|
||||
# before. It is abnormal. Possibly disconnect?
|
||||
# TODO: Warn and emit logs about this.
|
||||
continue
|
||||
async with stream.close_lock:
|
||||
if stream.event_remote_closed.is_set():
|
||||
# TODO: Warn "Received data from remote after stream was closed by them. (len = %d)" # noqa: E501
|
||||
continue
|
||||
await stream.incoming_data.put(message)
|
||||
elif flag in (
|
||||
HeaderTags.CloseInitiator.value,
|
||||
|
||||
Reference in New Issue
Block a user