diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-09-18 15:53:45 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-09-18 15:53:45 -0400 |
commit | d158e292536dc139379f1beb95891892dbd321d0 (patch) | |
tree | 948d52583c2bb58f6102360dbfc111199d02de71 /termcast.py | |
parent | 4cc56140c266bffeb336d853a5621300f1e4d33d (diff) | |
download | python-termcast-server-d158e292536dc139379f1beb95891892dbd321d0.tar.gz python-termcast-server-d158e292536dc139379f1beb95891892dbd321d0.zip |
handle another exception
Diffstat (limited to 'termcast.py')
-rw-r--r-- | termcast.py | 7 |
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 |