aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-09-15 01:07:28 -0400
committerJesse Luehrs <doy@tozt.net>2014-09-15 01:07:28 -0400
commitf5c3448d15e1e9e1f51d4c9f2b0d1b8a4e0e4b10 (patch)
treea1b0ba8ecad78219cfcb725bef67fd2f2798c584
parente820f9c4a7bcf887d77eb0df8946a59f32313e61 (diff)
downloadpython-termcast-server-f5c3448d15e1e9e1f51d4c9f2b0d1b8a4e0e4b10.tar.gz
python-termcast-server-f5c3448d15e1e9e1f51d4c9f2b0d1b8a4e0e4b10.zip
keep watchers around until they press q
-rw-r--r--ssh.py5
1 files changed, 4 insertions, 1 deletions
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):