From b94e80c3464aabac61d594ff4b0273ffacd94127 Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Tue, 10 Sep 2019 14:26:45 +0200 Subject: [PATCH] pulseaudio: Ensure that both completion channels are read --- src/widgets/sound.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/widgets/sound.rs b/src/widgets/sound.rs index a75d895..9f2e3e1 100644 --- a/src/widgets/sound.rs +++ b/src/widgets/sound.rs @@ -245,7 +245,10 @@ impl PulseAudioClient { conn.mainloop.borrow_mut().run().unwrap(); }); - if !rx1.recv().unwrap() || !rx2.recv().unwrap() { + let pa_writer_res = rx1.recv().unwrap(); + let pa_reader_res = rx2.recv().unwrap(); + + if !pa_writer_res || !pa_reader_res { return Err(::std::io::Error::new( ::std::io::ErrorKind::Other, "unable to start pulseaudio thread",