Fix logic for when to sleep on mpd_handler thread
This commit is contained in:
parent
98be10682e
commit
ec4632cc91
1 changed files with 2 additions and 2 deletions
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue