From c80ebb0e8dfa77760a6f5d0b9a1584f37da34278 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 13 Jul 2018 09:14:36 -0400 Subject: [PATCH] Explicitly close connection before replacement If an existing follower is stalled out, close the socket explicitly to avoid leaving it open in lsof. --- confluent_server/confluent/collective/manager.py | 1 + 1 file changed, 1 insertion(+) diff --git a/confluent_server/confluent/collective/manager.py b/confluent_server/confluent/collective/manager.py index c681e3bd..87477241 100644 --- a/confluent_server/confluent/collective/manager.py +++ b/confluent_server/confluent/collective/manager.py @@ -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)