try/except Control socket writes
This commit is contained in:
parent
de389b34b8
commit
22b6a19054
1 changed files with 4 additions and 1 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue