diff --git a/src/scripts/policy-node.lua b/src/scripts/policy-node.lua index 43df701c..a25d0a5e 100644 --- a/src/scripts/policy-node.lua +++ b/src/scripts/policy-node.lua @@ -123,6 +123,7 @@ function createLink (si, si_target, passthrough, exclusive) end Log.info (l, "activated si-standard-link") end + scheduleRescan() end) end @@ -696,9 +697,11 @@ function handleLinkable (si) if link ~= nil then -- remove old link if ((link:get_active_features() & Feature.SessionItem.ACTIVE) == 0) then - -- remove also not yet activated links: they might never become active, - -- and we should not loop waiting for them - Log.warning (link, "Link was not activated before removing") + -- Link not yet activated. We don't want to remove it now, as that + -- may cause problems. Instead, give up for now. A rescan is scheduled + -- once the link activates. + Log.info (link, "Link to be moved was not activated, will wait for it.") + return end si_flags[si_id].peer_id = nil link:remove ()