forked from platypush/platypush
Better timeout management on mopidy status refresh.
This commit is contained in:
parent
5346833152
commit
58518a4d63
1 changed files with 6 additions and 0 deletions
|
@ -150,6 +150,12 @@ class MopidyClient(Thread):
|
||||||
if self._refresh_in_progress.is_set():
|
if self._refresh_in_progress.is_set():
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# Unless we are also retrieving the tracks, we don't need a high timeout here.
|
||||||
|
# A high timeout may result in event lagging if some of the responses aren't received.
|
||||||
|
# In this case, better to timeout early and retry.
|
||||||
|
if not with_tracks:
|
||||||
|
timeout = 5
|
||||||
|
|
||||||
events = []
|
events = []
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue