aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ssh.py1
-rw-r--r--termcast.py5
2 files changed, 5 insertions, 1 deletions
diff --git a/ssh.py b/ssh.py
index 0758d49..e191438 100644
--- a/ssh.py
+++ b/ssh.py
@@ -37,6 +37,7 @@ class Connection(object):
while True:
c = self.chan.recv(1)
if c == b'q':
+ self.publisher.notify("viewer_disconnect", self.watching_id)
break
self.chan.close()
diff --git a/termcast.py b/termcast.py
index e849fe8..40262e0 100644
--- a/termcast.py
+++ b/termcast.py
@@ -81,7 +81,10 @@ class Connection(object):
if connection_id != self.connection_id:
return
self.publisher.notify("new_data", self.connection_id, self.handler.buf, b'')
- self.client.send("msg watcher connected")
+ self.client.send(b"msg watcher connected\n")
+
+ def msg_viewer_disconnect(self, connection_id):
+ self.client.send(b"msg watcher disconnected\n")
def request_get_streamers(self):
return {