From d158e292536dc139379f1beb95891892dbd321d0 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 18 Sep 2014 15:53:45 -0400 Subject: handle another exception --- termcast.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'termcast.py') diff --git a/termcast.py b/termcast.py index e94da82..d5d2fe3 100644 --- a/termcast.py +++ b/termcast.py @@ -145,7 +145,12 @@ class Connection(object): self.handler.process(buf) while True: - buf = self.client.recv(1024) + buf = b'' + try: + buf = self.client.recv(1024) + except Exception as e: + print('*** recv failed: ' + str(e)) + if len(buf) > 0: self.publisher.notify( "new_data", self.connection_id, self.handler.buf, buf -- cgit v1.2.3-54-g00ecf