From: Guus Sliepen Date: Fri, 25 Sep 2020 19:53:12 +0000 (+0200) Subject: Don't use fast timeouts for fully established connections. X-Git-Url: http://git.meshlink.io/?p=meshlink;a=commitdiff_plain;h=46dddb8c778a4713ded29d68d58e410cf4618fc7 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. --- 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; }