Explorar o código

Cut exit command at 20

Gabriel Gosparo %!s(int64=6) %!d(string=hai) anos
pai
achega
5684571568
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      ObjectSsh.py

+ 4 - 0
ObjectSsh.py

@@ -48,8 +48,12 @@ class ObjectSsh(ObjectConnection):
             self.connection_data()
         else:
             self.connection_old()
+        nc = 0
         while self.QUIT:
+            if nc == 20:
+                self.QUIT = False
             # send quit to terminal until exit confirmation
+            nc += 1
             self.command_quit(self.olt.get_write_exit())
         self.stdin.close()
         self.stdout.close()