From f5c3448d15e1e9e1f51d4c9f2b0d1b8a4e0e4b10 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 15 Sep 2014 01:07:28 -0400 Subject: keep watchers around until they press q --- ssh.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ssh.py b/ssh.py index b2d4a6d..35a1595 100644 --- a/ssh.py +++ b/ssh.py @@ -26,7 +26,10 @@ class Connection(object): # id in here self.publisher.notify("new_viewer", "some-stream") - time.sleep(5) + while True: + c = self.chan.recv(1) + if c == b'q': + break self.chan.close() def msg_new_data(self, connection_id, prev_buf, data): -- cgit v1.2.3-54-g00ecf