From 0dc46f0dc8cebf94b7b7e4063e2fff151c715e4a Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Tue, 18 Feb 2014 13:42:49 +0100 Subject: [PATCH] fix: set connection to NULL when finishing it This will avoid CloseConnections() to try to close an already closed connection. --- repmgrd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/repmgrd.c b/repmgrd.c index a38e1915..be416884 100644 --- a/repmgrd.c +++ b/repmgrd.c @@ -956,6 +956,7 @@ do_failover(void) /* Close the connection to this server */ PQfinish(myLocalConn); + myLocalConn = NULL; /* * determine which one is the best candidate to promote to primary