2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-17 13:13:18 +00:00

Revert "After 60 seconds of 'connect' limbo, kick a connection attempt"

This reverts commit e4aa8731413b736584e282470b41b35afd75a25d.
There may be some memory consumption issues with this feature.
This commit is contained in:
Jarrod Johnson 2016-05-25 10:59:22 -04:00
parent 2dd44b1725
commit 20abffdbee

View File

@ -180,8 +180,6 @@ class ConsoleHandler(object):
self.connectionthread.kill()
self.connectionthread = None
self.connectionthread = eventlet.spawn(self._connect_backend)
# in 60 seconds, kick connect() if it didn't complete
self.kickconnect = eventlet.spawn_after(60, self._connect)
def _connect_backend(self):
if self._console:
@ -219,9 +217,6 @@ class ConsoleHandler(object):
try:
self._console.connect(self.get_console_output)
except exc.TargetEndpointBadCredentials:
if self.kickconnect:
self.kickconnect.cancel()
self.kickconnect = None
self.error = 'badcredentials'
self.connectstate = 'unconnected'
self._send_rcpts({'connectstate': self.connectstate,
@ -231,9 +226,6 @@ class ConsoleHandler(object):
self.reconnect = eventlet.spawn_after(retrytime, self._connect)
return
except exc.TargetEndpointUnreachable:
if self.kickconnect:
self.kickconnect.cancel()
self.kickconnect = None
self.error = 'unreachable'
self.connectstate = 'unconnected'
self._send_rcpts({'connectstate': self.connectstate,
@ -245,9 +237,6 @@ class ConsoleHandler(object):
except Exception:
_tracelog.log(traceback.format_exc(), ltype=log.DataTypes.event,
event=log.Events.stacktrace)
if self.kickconnect:
self.kickconnect.cancel()
self.kickconnect = None
self.error = 'unknown'
self.connectstate = 'unconnected'
self._send_rcpts({'connectstate': self.connectstate,
@ -259,9 +248,6 @@ class ConsoleHandler(object):
self._got_connected()
def _got_connected(self):
if self.kickconnect:
self.kickconnect.cancel()
self.kickconnect = None
self.connectstate = 'connected'
self.log(
logdata='console connected', ltype=log.DataTypes.event,