Revert "ugly test"

This reverts commit ffe5b6272a9bd2a7aed78629e45e2267822d8756.
This commit is contained in:
Tanguy 2023-03-06 12:24:46 +01:00
parent ffe5b6272a
commit ed70a576a1
No known key found for this signature in database
GPG Key ID: 7DD8EC6B6CE6C45E

View File

@ -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: