From 11bd55308f41de3006c20c3b7ac431b0fb53fa89 Mon Sep 17 00:00:00 2001 From: Giovanni Petrantoni Date: Wed, 12 Feb 2020 17:29:04 +0900 Subject: [PATCH] Revert "Properly use already specified MaxReadWriteTime as timeout" This reverts commit 8f5dd75e7f28da08de2bf393b93cd290b82ed78b. --- libp2p/muxers/mplex/mplex.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libp2p/muxers/mplex/mplex.nim b/libp2p/muxers/mplex/mplex.nim index b2b6105..92ebaac 100644 --- a/libp2p/muxers/mplex/mplex.nim +++ b/libp2p/muxers/mplex/mplex.nim @@ -23,6 +23,8 @@ import ../muxer, logScope: topic = "Mplex" +const HandleTimeout = 30.seconds + type Mplex* = ref object of Muxer remote*: Table[uint, LPChannel] @@ -69,7 +71,7 @@ method handle*(m: Mplex) {.async, gcsafe.} = while not m.connection.closed: trace "waiting for data" let - res = await one(m.connection.readMsg(), messageTimeout(MaxReadWriteTime)) + res = await one(m.connection.readMsg(), messageTimeout(HandleTimeout)) msg = res.read() if msg.isNone: trace "connection EOF"