Fix logic for when to sleep on mpd_handler thread

This commit is contained in:
Stephen Seo 2022-01-14 10:55:47 +09:00
parent 98be10682e
commit ec4632cc91

View file

@ -386,8 +386,8 @@ impl MPDHandler {
'main: loop { 'main: loop {
if !self.is_reading_picture() if !self.is_reading_picture()
|| (!self.is_authenticated().unwrap_or(false) && self.is_authenticated().unwrap_or(true)
&& !self.failed_to_authenticate().unwrap_or(false)) && !self.failed_to_authenticate().unwrap_or(false)
{ {
thread::sleep(SLEEP_DURATION); thread::sleep(SLEEP_DURATION);
if let Ok(write_handle) = self.state.try_write() { if let Ok(write_handle) = self.state.try_write() {