From c19a488b62c0bed999874bb32f204501edd5d17b Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 17 Feb 2025 19:18:44 -0800 Subject: [PATCH] manager: Hold onto an extra JobManagerMessage sender Currently the only interfaces that use the job manager are Deck-specific, which will cause the channel to be dropped early on other hardware. Since it exits early, the manager sees this as an error condition and exits with a failure status. By keeping an unused reference to it we can prevent it from being dropped early. --- src/manager/user.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/manager/user.rs b/src/manager/user.rs index a9fde70..557fcd8 100644 --- a/src/manager/user.rs +++ b/src/manager/user.rs @@ -97,6 +97,7 @@ macro_rules! setter { struct SteamOSManager { proxy: Proxy<'static>, + _job_manager: UnboundedSender, } struct AmbientLightSensor1 { @@ -174,7 +175,12 @@ impl SteamOSManager { job_manager: UnboundedSender, ) -> Result { job_manager.send(JobManagerCommand::MirrorConnection(system_conn))?; - Ok(SteamOSManager { proxy }) + Ok(SteamOSManager { + proxy, + // Hold onto extra sender to make sure the channel isn't dropped + // early on devices we don't have any interfaces that use job control. + _job_manager: job_manager, + }) } }