From 46dddb8c778a4713ded29d68d58e410cf4618fc7 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Fri, 25 Sep 2020 21:53:12 +0200 Subject: [PATCH] Don't use fast timeouts for fully established connections. During the fast retry period, we want to have a fast ping timeout until we have a fully working connection. However, the code still used fast timeouts during the fast retry window even if the connection was fully established. --- src/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net.c b/src/net.c index 1614d843..5689a040 100644 --- a/src/net.c +++ b/src/net.c @@ -117,7 +117,7 @@ static void timeout_handler(event_loop_t *loop, void *data) { int pingtimeout = c->node ? mesh->dev_class_traits[c->node->devclass].pingtimeout : default_timeout; int pinginterval = c->node ? mesh->dev_class_traits[c->node->devclass].pinginterval : default_interval; - if(c->outgoing && c->outgoing->timeout < 5) { + if(c->outgoing && !c->status.active && c->outgoing->timeout < 5) { pingtimeout = 1; } -- 2.39.5