MPD: Reconnect mpd client afetr OSError (#4651)
If the mpd client ran into an socket timeout, the socket will raise an OSError on every further request. This adds OSError to the list of excptions, that causes a client reconnect. This fixes #4650 Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
This commit is contained in:
1 parent
dd84b4e237
commit
5c807c6bd9
1 file changed
+1
-1
@@ -100,7 +100,7 @@ class MpdDevice(MediaPlayerDevice):
|
||||
try:
|
||||
self.status = self.client.status()
|
||||
self.currentsong = self.client.currentsong()
|
||||
except (mpd.ConnectionError, BrokenPipeError, ValueError):
|
||||
except (mpd.ConnectionError, OSError, BrokenPipeError, ValueError):
|
||||
# Cleanly disconnect in case connection is not in valid state
|
||||
try:
|
||||
self.client.disconnect()
|
||||
|
||||
Reference in new issue
Block a user