diff --git a/repmgr-action-node.c b/repmgr-action-node.c index 0659a526..2f6de3be 100644 --- a/repmgr-action-node.c +++ b/repmgr-action-node.c @@ -2471,7 +2471,7 @@ do_node_rejoin(void) log_hint(_("check the local node is registered with the current primary \"%s\" (ID: %i)"), primary_node_record.node_name, primary_node_record.node_id); - PQfinish(upstream_conn); + PQfinish(primary_conn); exit(ERR_BAD_CONFIG); }