diff --git a/src/server/connection.rs b/src/server/connection.rs index 5ea1e923a..b1af36e47 100644 --- a/src/server/connection.rs +++ b/src/server/connection.rs @@ -502,10 +502,12 @@ impl Connection { } else if &name == "audio" { conn.audio = enabled; conn.send_permission(Permission::Audio, enabled).await; - if let Some(s) = conn.server.upgrade() { - s.write().unwrap().subscribe( - super::audio_service::NAME, - conn.inner.clone(), conn.audio_enabled()); + if conn.authorized { + if let Some(s) = conn.server.upgrade() { + s.write().unwrap().subscribe( + super::audio_service::NAME, + conn.inner.clone(), conn.audio_enabled()); + } } } else if &name == "file" { conn.file = enabled;