From ff9b49064df436b0523bda66e567eb60ecf07f70 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Mon, 1 Nov 2021 12:14:04 +0200 Subject: [PATCH] default-routes.lua: add missing break in best route selection logic Fixes #86 --- src/scripts/default-routes.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scripts/default-routes.lua b/src/scripts/default-routes.lua index 9c5593a4..b55ae4e0 100644 --- a/src/scripts/default-routes.lua +++ b/src/scripts/default-routes.lua @@ -266,6 +266,7 @@ function findBestRoute(dev_info, device_id) if ri.direction == "Output" and ri.available ~= ri.prev_available then best_avail = ri ri.save = true + break elseif ri.available == "yes" then if (best_avail == nil or ri.priority > best_avail.priority) then best_avail = ri -- GitLab