X-Git-Url: https://git.ralfj.de/saartuer.git/blobdiff_plain/5871e71831a0938f6bfb36f6a90e00fd7284e367..7a99a7eb3b2f2c539836875d2cc8ea15a42ea49f:/tysock.py diff --git a/tysock.py b/tysock.py index 11b5183..676f573 100644 --- a/tysock.py +++ b/tysock.py @@ -71,8 +71,11 @@ class TySocket(): # _answer will be called, and it will close the connection else: waynesend(conn, 'Command not found') - conn.close() except KeyboardInterrupt: raise # forward Ctrl-C to the outside + except socket.timeout: + # it's okay + logger.info("TySocket: Connection timed out") except Exception as e: logger.critical("TySocket: Something went wrong: %s" % str(e)) + conn.close()