fixed handling of server crash

This commit is contained in:
Martin Wagner 2020-08-14 22:08:56 +02:00
parent 0daa1ef994
commit 84272d31cc

View File

@ -915,7 +915,8 @@ class Client(MPDClient):
self.emitter.emit("update")
self.last_status=status
except MPDBase.ConnectionError:
except: # (MPDBase.ConnectionError, ConnectionResetError) as e:
self.disconnect()
self.last_status={}
self.emitter.emit("disconnected")
if self.disconnected_loop():