aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-09-18 15:53:45 -0400
committerJesse Luehrs <doy@tozt.net>2014-09-18 15:53:45 -0400
commitd158e292536dc139379f1beb95891892dbd321d0 (patch)
tree948d52583c2bb58f6102360dbfc111199d02de71
parent4cc56140c266bffeb336d853a5621300f1e4d33d (diff)
downloadpython-termcast-server-d158e292536dc139379f1beb95891892dbd321d0.tar.gz
python-termcast-server-d158e292536dc139379f1beb95891892dbd321d0.zip
handle another exception
-rw-r--r--termcast.py7
1 files changed, 6 insertions, 1 deletions
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