diff --git a/TODO b/TODO index c2651db6..fa95afec 100644 --- a/TODO +++ b/TODO @@ -35,3 +35,4 @@ KeyError: '' why python 2.7 with excessive select() would transpose typing so badly... while the problem cannot be reproduced without that problem fixed, the problem should only cause poor performance, not induce transpose of data... + -passphrase lost on restart of service? diff --git a/confluent_server/confluent/consoleserver.py b/confluent_server/confluent/consoleserver.py index 05dbf208..3ac84f11 100644 --- a/confluent_server/confluent/consoleserver.py +++ b/confluent_server/confluent/consoleserver.py @@ -37,6 +37,7 @@ _genwatchattribs = frozenset(('console.method', 'console.logging')) _tracelog = None + class _ConsoleHandler(object): def __init__(self, node, configmanager): self._dologging = True @@ -47,6 +48,7 @@ class _ConsoleHandler(object): self.node = node self.connectstate = 'unconnected' self.clientcount = 0 + self._isalive = True self.logger = log.Logger(node, console=True, tenant=configmanager.tenant) self.buffer = bytearray() @@ -208,9 +210,11 @@ class _ConsoleHandler(object): logdata='console disconnected', ltype=log.DataTypes.event, event=log.Events.consoledisconnect) self._send_rcpts({'connectstate': self.connectstate}) - self._connect() + if self._isalive: + self._connect() def close(self): + self._isalive = False self._send_rcpts({'deleting': True}) self._disconnect() if self._console: diff --git a/confluent_server/confluent/shellmodule.py b/confluent_server/confluent/shellmodule.py index 6af11682..d4f454c4 100644 --- a/confluent_server/confluent/shellmodule.py +++ b/confluent_server/confluent/shellmodule.py @@ -96,7 +96,7 @@ class ExecConsole(conapi.Console): return self.subproc.terminate() waittime = 10 - while self.subproc is not None or self.subproc.poll() is None: + while self.subproc is not None and self.subproc.poll() is None: eventlet.sleep(1) waittime -= 1 if waittime == 0: