From: Guus Sliepen Date: Sun, 15 Sep 2019 11:22:17 +0000 (+0200) Subject: Reset UTCP timers when learning a node's public key. X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=88bd3d78991c721062506be7975f7564be4d82da;p=meshlink Reset UTCP timers when learning a node's public key. If we try to open a channel to a node whose public key we do not yet have, a REQ_KEY request is sent out. When the answer comes back we know the key, but we have to tell UTCP to reset the timers, otherwise we have to wait for a retransmission timeout to occur before resending the SYN packet. --- diff --git a/src/protocol_key.c b/src/protocol_key.c index 2a4dbe02..836737aa 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -145,6 +145,9 @@ static bool req_key_ext_h(meshlink_handle_t *mesh, connection_t *c, const char * } } + /* Also reset any UTCP timers */ + utcp_reset_timers(from->utcp); + return true; }