From 84272d31cca1ca22ab42532178795e9e2e133b5b Mon Sep 17 00:00:00 2001 From: Martin Wagner Date: Fri, 14 Aug 2020 22:08:56 +0200 Subject: [PATCH] fixed handling of server crash --- bin/mpdevil.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/mpdevil.py b/bin/mpdevil.py index bb27b8e..1303844 100644 --- a/bin/mpdevil.py +++ b/bin/mpdevil.py @@ -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():