silently eat Control socket .send() failures

This commit is contained in:
jesopo 2019-11-08 13:38:07 +00:00
parent f2a13f9015
commit 5fcf18313e

View file

@ -111,5 +111,8 @@ class Control(PollSource.PollSource):
def _send_action(self, client: ControlClient, action: str,
data: typing.Optional[str], id: typing.Optional[str]=None):
client.write_line(
json.dumps({"action": action, "data": data, "id": id}))
try:
client.write_line(
json.dumps({"action": action, "data": data, "id": id}))
except:
pass