suspend-node: trigger idle timeout also if a node goes into "error" state

This is what media-session does as well and allows recovering from
errors without having to restart wireplumber
This commit is contained in:
George Kiagiadakis 2022-04-04 11:31:37 +03:00
parent 812fc9b6b1
commit 8738955723

View file

@ -26,7 +26,7 @@ om:connect("object-added", function (om, node)
end
-- Add a timeout source if idle for at least 5 seconds
if cur_state == "idle" then
if cur_state == "idle" or cur_state == "error" then
-- honor "session.suspend-timeout-seconds" if specified
local timeout =
tonumber(node.properties["session.suspend-timeout-seconds"]) or 5