2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-29 13:00:03 +00:00

Explicitly close connection before replacement

If an existing follower is stalled out, close the socket explicitly
to avoid leaving it open in lsof.
This commit is contained in:
Jarrod Johnson 2018-07-13 09:14:36 -04:00
parent efaf1dae70
commit c80ebb0e8d

View File

@ -90,6 +90,7 @@ def connect_to_leader(cert=None, name=None, leader=None):
raise Exception(keydata['error'])
if follower is not None:
follower.kill()
cfm.stop_following()
follower = None
colldata = tlvdata.recv(remote)
globaldata = tlvdata.recv(remote)