fix: don't close client sockets too early
authorRalf Jung <post@ralfj.de>
Wed, 19 Feb 2014 22:14:38 +0000 (23:14 +0100)
committerRalf Jung <post@ralfj.de>
Wed, 19 Feb 2014 22:14:38 +0000 (23:14 +0100)
tysock.py

index b7cb1cc6b09e2cb909481a256b9f9ee203534d82..2a5e193ad1ab71b967dc8b375647235eababb36b 100644 (file)
--- a/tysock.py
+++ b/tysock.py
@@ -72,6 +72,7 @@ class TySocket():
                                if data in self.CMDs:
                                        self._sm.callback(self.CMDs[data], self._answer(conn))
                                        # _answer will be called, and it will close the connection
                                if data in self.CMDs:
                                        self._sm.callback(self.CMDs[data], self._answer(conn))
                                        # _answer will be called, and it will close the connection
+                                       continue # make sure we break so we don't close it
                                else:
                                        waynesend(conn, 'Command not found')
                        except KeyboardInterrupt:
                                else:
                                        waynesend(conn, 'Command not found')
                        except KeyboardInterrupt: