mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
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 <manusheel.edu@gmail.com>
This commit is contained in:
@ -493,7 +493,7 @@ class Yamux(IMuxedConn):
|
||||
f"type={typ}, flags={flags}, stream_id={stream_id},"
|
||||
f"length={length}"
|
||||
)
|
||||
if typ == TYPE_DATA and flags & FLAG_SYN:
|
||||
if (typ == TYPE_DATA or typ == TYPE_WINDOW_UPDATE) and flags & FLAG_SYN:
|
||||
async with self.streams_lock:
|
||||
if stream_id not in self.streams:
|
||||
stream = YamuxStream(stream_id, self, False)
|
||||
|
||||
1
newsfragments/701.bugfix.rst
Normal file
1
newsfragments/701.bugfix.rst
Normal file
@ -0,0 +1 @@
|
||||
align stream creation logic with yamux specification
|
||||
Reference in New Issue
Block a user