mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +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"type={typ}, flags={flags}, stream_id={stream_id},"
|
||||||
f"length={length}"
|
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:
|
async with self.streams_lock:
|
||||||
if stream_id not in self.streams:
|
if stream_id not in self.streams:
|
||||||
stream = YamuxStream(stream_id, self, False)
|
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