diff --git a/confluent_server/confluent/collective/manager.py b/confluent_server/confluent/collective/manager.py index abb4fc64..7e597176 100644 --- a/confluent_server/confluent/collective/manager.py +++ b/confluent_server/confluent/collective/manager.py @@ -478,10 +478,10 @@ def handle_connection(connection, cert, request, local=False): return log.log({'info': 'Connecting in response to assimilation', 'subsystem': 'collective'}) - if cfm.cfgstreams: - retire_as_leader(connection.getpeername()) - tlvdata.send(connection, {'status': 0}) newleader = connection.getpeername()[0] + if cfm.cfgstreams: + retire_as_leader(newleader) + tlvdata.send(connection, {'status': 0}) connection.close() if not connect_to_leader(None, None, leader=newleader): if retrythread is None: