Create an inbound stream when being a dcutr client

This commit is contained in:
Diego 2023-11-22 01:01:47 +01:00
parent ce0685c272
commit 3447baa038
No known key found for this signature in database
GPG Key ID: C9DAC9BF68D1F806

View File

@ -389,7 +389,14 @@ proc createStream(m: Yamux, id: uint32, isSrc: bool): YamuxChannel =
closedRemotely: newFuture[void]()
)
result.objName = "YamuxStream"
result.dir = if isSrc: Direction.Out else: Direction.In
result.dir =
if isSrc:
if m.connection.transportDir == Direction.In:
Direction.In
else:
Direction.Out
else:
Direction.In
result.timeoutHandler = proc(): Future[void] {.gcsafe.} =
trace "Idle timeout expired, resetting YamuxChannel"
result.reset()