mirror of
https://github.com/status-im/nim-libp2p.git
synced 2025-02-27 03:50:38 +00:00
Revert "ugly test"
This reverts commit ffe5b6272a9bd2a7aed78629e45e2267822d8756.
This commit is contained in:
parent
ffe5b6272a
commit
ed70a576a1
@ -179,7 +179,7 @@ method handle*(m: Mplex) {.async, gcsafe.} =
|
|||||||
trace "pushing data to channel", m, channel, len = data.len
|
trace "pushing data to channel", m, channel, len = data.len
|
||||||
try:
|
try:
|
||||||
let start = Moment.now()
|
let start = Moment.now()
|
||||||
discard channel.pushData(data)
|
await channel.pushData(data)
|
||||||
let delay = Moment.now() - start
|
let delay = Moment.now() - start
|
||||||
|
|
||||||
if delay > 1.seconds:
|
if delay > 1.seconds:
|
||||||
@ -192,10 +192,10 @@ method handle*(m: Mplex) {.async, gcsafe.} =
|
|||||||
discard # Ignore message, same as if `cleanupChann` had completed.
|
discard # Ignore message, same as if `cleanupChann` had completed.
|
||||||
|
|
||||||
of MessageType.CloseIn, MessageType.CloseOut:
|
of MessageType.CloseIn, MessageType.CloseOut:
|
||||||
discard channel.pushEof()
|
await channel.pushEof()
|
||||||
of MessageType.ResetIn, MessageType.ResetOut:
|
of MessageType.ResetIn, MessageType.ResetOut:
|
||||||
channel.remoteReset = true
|
channel.remoteReset = true
|
||||||
discard channel.reset()
|
await channel.reset()
|
||||||
except CancelledError:
|
except CancelledError:
|
||||||
debug "Unexpected cancellation in mplex handler", m
|
debug "Unexpected cancellation in mplex handler", m
|
||||||
except LPStreamEOFError as exc:
|
except LPStreamEOFError as exc:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user