]> git.meshlink.io Git - meshlink/commitdiff
Use the fast retry period of the destination node's device class.
authorGuus Sliepen <guus@meshlink.io>
Sat, 5 Sep 2020 09:52:12 +0000 (11:52 +0200)
committerGuus Sliepen <guus@meshlink.io>
Mon, 7 Sep 2020 15:08:34 +0000 (17:08 +0200)
src/net_socket.c

index a692313958850a0f1b87db3bb313930684cb59b9..7ac6dbbdbe023b06033e5e76956b964ff2cdc9b6 100644 (file)
@@ -87,7 +87,7 @@ static void retry_outgoing_handler(event_loop_t *loop, void *data) {
 }
 
 void retry_outgoing(meshlink_handle_t *mesh, outgoing_t *outgoing) {
-       if(!mesh->reachable && mesh->loop.now.tv_sec < mesh->last_unreachable + mesh->dev_class_traits[mesh->devclass].fast_retry_period) {
+       if(!mesh->reachable && mesh->loop.now.tv_sec < mesh->last_unreachable + mesh->dev_class_traits[outgoing->node->devclass].fast_retry_period) {
                outgoing->timeout = 1;
        } else {
                outgoing->timeout += 5;