2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-23 01:53:28 +00:00

Pass only the name rather than full sockaddr on retire

Followers of a server that is retiring to join the better leader
were being given incorrect format which would fail in the dns lookup.
This commit is contained in:
Jarrod Johnson 2021-09-30 08:11:19 -04:00
parent d899cfbf1a
commit c1113430a2

View File

@ -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: