Add a timeout in the select() in mpd_client

This commit is contained in:
mathieui 2013-03-17 18:38:30 +01:00
parent bbe041fd58
commit c1ae17c3d2

View file

@ -31,7 +31,7 @@ class UpdateThread(threading.Thread):
if password:
self.c.password(password)
self.c.send_idle()
select([self.c], [], [])
select([self.c], [], [], timeout=600)
self.c.fetch_idle()
status = self.c.status()
if status['state'] == 'play' and self.alive: