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:
@@ -97,7 +97,7 @@ function createLink (si_ep, si_target)
|
|||||||
si_link:activate (Feature.SessionItem.ACTIVE, function (l, e)
|
si_link:activate (Feature.SessionItem.ACTIVE, function (l, e)
|
||||||
if e then
|
if e then
|
||||||
Log.warning (l, "failed to activate si-standard-link: " .. tostring(e))
|
Log.warning (l, "failed to activate si-standard-link: " .. tostring(e))
|
||||||
si_link:remove ()
|
l:remove ()
|
||||||
else
|
else
|
||||||
Log.info (l, "activated si-standard-link")
|
Log.info (l, "activated si-standard-link")
|
||||||
end
|
end
|
||||||
|
@@ -66,7 +66,7 @@ function createLink (si, si_target, passthrough, exclusive)
|
|||||||
si_link:activate (Feature.SessionItem.ACTIVE, function (l, e)
|
si_link:activate (Feature.SessionItem.ACTIVE, function (l, e)
|
||||||
if e then
|
if e then
|
||||||
Log.warning (l, "failed to activate si-standard-link: " .. tostring(e))
|
Log.warning (l, "failed to activate si-standard-link: " .. tostring(e))
|
||||||
si_link:remove ()
|
l:remove ()
|
||||||
else
|
else
|
||||||
Log.info (l, "activated si-standard-link")
|
Log.info (l, "activated si-standard-link")
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user