Use transportDir to choose initial stream id

This commit is contained in:
Diego 2023-11-22 14:31:24 +01:00
parent 3447baa038
commit 5834ca83c3
No known key found for this signature in database
GPG Key ID: C9DAC9BF68D1F806
1 changed files with 1 additions and 1 deletions

View File

@ -534,6 +534,6 @@ method newStream*(
proc new*(T: type[Yamux], conn: Connection, maxChannCount: int = MaxChannelCount): T =
T(
connection: conn,
currentId: if conn.dir == Out: 1 else: 2,
currentId: if conn.transportDir == Out: 1 else: 2,
maxChannCount: maxChannCount
)