mirror of
https://github.com/status-im/nim-libp2p.git
synced 2025-02-17 23:36:34 +00:00
Create an inbound stream when being a dcutr client
This commit is contained in:
parent
ce0685c272
commit
3447baa038
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user