Skip to content

Commit ef16f3c

Browse files
acul71seetadev
andauthored
fix: accept new streams for both DATA and WINDOW_UPDATE frames with the SYN flag (#702)
* fix: accept new streams for both and frames with the flag * doc: newsfragment --------- Co-authored-by: Manu Sheel Gupta <[email protected]>
1 parent 6a92fa2 commit ef16f3c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

libp2p/stream_muxer/yamux/yamux.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ async def handle_incoming(self) -> None:
493493
f"type={typ}, flags={flags}, stream_id={stream_id},"
494494
f"length={length}"
495495
)
496-
if typ == TYPE_DATA and flags & FLAG_SYN:
496+
if (typ == TYPE_DATA or typ == TYPE_WINDOW_UPDATE) and flags & FLAG_SYN:
497497
async with self.streams_lock:
498498
if stream_id not in self.streams:
499499
stream = YamuxStream(stream_id, self, False)

newsfragments/701.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
align stream creation logic with yamux specification

0 commit comments

Comments
 (0)