From 8dc7a2d4b3e3bed1015a5b6c37e7c6426e87aff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Gallou=C3=ABt?= Date: Thu, 19 Jan 2017 14:53:56 +0000 Subject: [PATCH] Check for send_time too before dup --- mud.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mud.c b/mud.c index 0bd08b6..41d4561 100644 --- a/mud.c +++ b/mud.c @@ -1240,7 +1240,8 @@ mud_send(struct mud *mud, const void *data, size_t size, int tc) limit = path->rtt / 2; } - if (mud_timeout(now, path->recv_time, mud->send_timeout)) { + if (mud_timeout(now, path->recv_time, mud->send_timeout + MUD_ONE_SEC) && + mud_timeout(now, path->send_time, mud->send_timeout)) { mud_send_path(mud, path, now, packet, packet_size, tc); path->limit = limit; continue;