From bf75ac9cd92cff419c50302e0b7a8432beee4b2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Gallou=C3=ABt?= Date: Fri, 15 Feb 2019 19:29:00 +0000 Subject: [PATCH] One sec failover MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adrien Gallouët --- mud.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mud.c b/mud.c index a5fcf82..a4a4539 100644 --- a/mud.c +++ b/mud.c @@ -1446,7 +1446,8 @@ mud_update(struct mud *mud, uint64_t now) continue; if (path->ok) { - if (path->msg_sent >= MUD_MSG_SENT_MAX) { + if (path->msg_sent >= MUD_MSG_SENT_MAX || (path->recv.time && + mud->last_recv_time > path->recv.time + MUD_ONE_SEC)) { mud_reset_path(mud, path); } else { if (!mtu || mtu > path->mtu.ok)