diff --git a/confluent_server/confluent/consoleserver.py b/confluent_server/confluent/consoleserver.py index c93b1c50..dd8341e3 100644 --- a/confluent_server/confluent/consoleserver.py +++ b/confluent_server/confluent/consoleserver.py @@ -255,11 +255,12 @@ class ConsoleHandler(object): self._send_rcpts({'connectstate': self.connectstate}) def _got_disconnected(self): - self.connectstate = 'unconnected' - self.log( - logdata='console disconnected', ltype=log.DataTypes.event, - event=log.Events.consoledisconnect) - self._send_rcpts({'connectstate': self.connectstate}) + if self.connectstate != 'unconnected': + self.connectstate = 'unconnected' + self.log( + logdata='console disconnected', ltype=log.DataTypes.event, + event=log.Events.consoledisconnect) + self._send_rcpts({'connectstate': self.connectstate}) if self._isalive: self._connect() diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index 53d2a23b..70d3ddff 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -219,6 +219,7 @@ class IpmiConsole(conapi.Console): self.broken = True self.error = data['error'] if self.connected: + self.connected = False self.datacallback(conapi.ConsoleEvent.Disconnect) else: self.datacallback(data)