Revert "Properly use already specified MaxReadWriteTime as timeout"
This reverts commit 8f5dd75e7f
.
This commit is contained in:
parent
ea0d167285
commit
11bd55308f
|
@ -23,6 +23,8 @@ import ../muxer,
|
||||||
logScope:
|
logScope:
|
||||||
topic = "Mplex"
|
topic = "Mplex"
|
||||||
|
|
||||||
|
const HandleTimeout = 30.seconds
|
||||||
|
|
||||||
type
|
type
|
||||||
Mplex* = ref object of Muxer
|
Mplex* = ref object of Muxer
|
||||||
remote*: Table[uint, LPChannel]
|
remote*: Table[uint, LPChannel]
|
||||||
|
@ -69,7 +71,7 @@ method handle*(m: Mplex) {.async, gcsafe.} =
|
||||||
while not m.connection.closed:
|
while not m.connection.closed:
|
||||||
trace "waiting for data"
|
trace "waiting for data"
|
||||||
let
|
let
|
||||||
res = await one(m.connection.readMsg(), messageTimeout(MaxReadWriteTime))
|
res = await one(m.connection.readMsg(), messageTimeout(HandleTimeout))
|
||||||
msg = res.read()
|
msg = res.read()
|
||||||
if msg.isNone:
|
if msg.isNone:
|
||||||
trace "connection EOF"
|
trace "connection EOF"
|
||||||
|
|
Loading…
Reference in New Issue