From 22b6a190544e6fca16697439296595f4fca05b84 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 11 Oct 2019 15:16:39 +0100 Subject: [PATCH] try/except Control socket writes --- src/Control.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Control.py b/src/Control.py index 19c2faaa..80bea331 100644 --- a/src/Control.py +++ b/src/Control.py @@ -13,7 +13,10 @@ class ControlClient(object): return self._socket.fileno() def read_lines(self) -> typing.List[str]: - data = self._socket.recv(2048) + try: + data = self._socket.recv(2048) + except: + data = b"" if not data: return None lines = (self._read_buffer+data).split(b"\n")