From 849193cf98702d7325a6b402212b6f85e191eb9f Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 7 Jan 2016 16:51:22 -0500 Subject: [PATCH] Have shell sessions not autoreconnect Unlike consoles, where the underlying concept is a real persistent thing that needs some care to reattach to watch, a shell session should die when it is lost, as a new one would have to be created anyway. Modify the disconnect behavior for a shell session to set closed and notify the receivers. It should also reap dependent watching objects in a future change. --- confluent_server/confluent/shellserver.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/confluent_server/confluent/shellserver.py b/confluent_server/confluent/shellserver.py index 1a8aaeb5..be7a36f1 100644 --- a/confluent_server/confluent/shellserver.py +++ b/confluent_server/confluent/shellserver.py @@ -34,6 +34,10 @@ class _ShellHandler(consoleserver.ConsoleHandler): # suppress logging through proving a stub 'log' function return + def _got_disconnected(self): + self.connectstate = 'closed' + self._send_rcpts({'connectstate': self.connectstate}) +