diff --git a/crates/sound/src/audio_backends/pipewire.rs b/crates/sound/src/audio_backends/pipewire.rs index 8748e8e..0c8e61a 100644 --- a/crates/sound/src/audio_backends/pipewire.rs +++ b/crates/sound/src/audio_backends/pipewire.rs @@ -385,10 +385,10 @@ impl AudioBackend for PwBackend { ) .expect("could not connect to the stream"); - lock_guard.unlock(); - // insert created stream in a hash table stream_hash.insert(stream_id, stream); + + lock_guard.unlock(); } Ok(())