policy-{node,endpoint-device}: do not hold reference to si_link in closure

This may keep the link alive for longer than expected
This commit is contained in:
George Kiagiadakis
2021-10-23 11:02:13 +03:00
parent 04f77a5fbc
commit 51713d309a
2 changed files with 2 additions and 2 deletions

View File

@@ -97,7 +97,7 @@ function createLink (si_ep, si_target)
si_link:activate (Feature.SessionItem.ACTIVE, function (l, e)
if e then
Log.warning (l, "failed to activate si-standard-link: " .. tostring(e))
si_link:remove ()
l:remove ()
else
Log.info (l, "activated si-standard-link")
end

View File

@@ -66,7 +66,7 @@ function createLink (si, si_target, passthrough, exclusive)
si_link:activate (Feature.SessionItem.ACTIVE, function (l, e)
if e then
Log.warning (l, "failed to activate si-standard-link: " .. tostring(e))
si_link:remove ()
l:remove ()
else
Log.info (l, "activated si-standard-link")
end