mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 16:46:28 +00:00
repmgrd: add missing PQfinish() calls
This commit is contained in:
@@ -3931,10 +3931,13 @@ check_connection(t_node_info *node_info, PGconn **conn)
|
|||||||
log_info(_("attempting to reconnect to node \"%s\" (ID: %i)"),
|
log_info(_("attempting to reconnect to node \"%s\" (ID: %i)"),
|
||||||
node_info->node_name,
|
node_info->node_name,
|
||||||
node_info->node_id);
|
node_info->node_id);
|
||||||
|
|
||||||
|
PQfinish(*conn);
|
||||||
*conn = establish_db_connection(node_info->conninfo, false);
|
*conn = establish_db_connection(node_info->conninfo, false);
|
||||||
|
|
||||||
if (PQstatus(*conn) != CONNECTION_OK)
|
if (PQstatus(*conn) != CONNECTION_OK)
|
||||||
{
|
{
|
||||||
|
PQfinish(*conn);
|
||||||
*conn = NULL;
|
*conn = NULL;
|
||||||
log_warning(_("reconnection to node \"%s\" (ID: %i) failed"),
|
log_warning(_("reconnection to node \"%s\" (ID: %i) failed"),
|
||||||
node_info->node_name,
|
node_info->node_name,
|
||||||
|
|||||||
Reference in New Issue
Block a user