]> git.seodisparate.com - mpd_info_screen/commitdiff
Fix logic for when to sleep on mpd_handler thread
authorStephen Seo <seo.disparate@gmail.com>
Fri, 14 Jan 2022 01:55:47 +0000 (10:55 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Fri, 14 Jan 2022 01:55:47 +0000 (10:55 +0900)
src/mpd_handler.rs

index 610b10367e7500aa5549249052d20dda6c6768b5..fc922a3cc689120e5e739afb61d0ec51f8b51c92 100644 (file)
@@ -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() {