Fix call to is_active_bdr_node() in BDR repmgrd

Following the fix to "is_active_bdr_node()" in 841f03ae, it turns out
the call in repmgrd-bdr.c was only accidentally working; explicitly
test for a false return value.
This commit is contained in:
Ian Barwick
2018-01-04 21:03:36 +09:00
parent aee12dc2c7
commit 6b223698c9

View File

@@ -124,9 +124,9 @@ monitor_bdr(void)
exit(ERR_BAD_CONFIG);
}
if (is_active_bdr_node(local_conn, local_node_info.node_name))
if (is_active_bdr_node(local_conn, local_node_info.node_name) == false)
{
log_error(_("BDR node %s is not active, terminating"),
log_error(_("BDR node \"%s\" is not active, terminating"),
local_node_info.node_name);
PQfinish(local_conn);
exit(ERR_BAD_CONFIG);