From: Stephen Seo Date: Fri, 14 Jan 2022 01:55:47 +0000 (+0900) Subject: Fix logic for when to sleep on mpd_handler thread X-Git-Tag: 0.2.16~1 X-Git-Url: https://git.seodisparate.com/stephenseo/LD54_Box_Survival?a=commitdiff_plain;h=ec4632cc91af9933320711111384a5fd05637f87;p=mpd_info_screen Fix logic for when to sleep on mpd_handler thread --- diff --git a/src/mpd_handler.rs b/src/mpd_handler.rs index 610b103..fc922a3 100644 --- a/src/mpd_handler.rs +++ b/src/mpd_handler.rs @@ -386,8 +386,8 @@ impl MPDHandler { 'main: loop { if !self.is_reading_picture() - || (!self.is_authenticated().unwrap_or(false) - && !self.failed_to_authenticate().unwrap_or(false)) + && self.is_authenticated().unwrap_or(true) + && !self.failed_to_authenticate().unwrap_or(false) { thread::sleep(SLEEP_DURATION); if let Ok(write_handle) = self.state.try_write() {