Wait a bit more before starting to complain
[saartuer.git] / tysock.py
index 11b5183b735c757f5740f73303106ce4cdfeca64..676f57398b28b73f81e5882b79fefd831e84e6ca 100644 (file)
--- 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()