Clarify calls to check_primary_status()

Use a constant rather than a magic number to indicate non-provision
of elapsed degraded monitoring time.
This commit is contained in:
Ian Barwick
2019-03-18 14:19:09 +09:00
parent 0940185f49
commit 43f28f4097
2 changed files with 3 additions and 2 deletions

View File

@@ -351,7 +351,7 @@ monitor_streaming_primary(void)
* check that the local node is still primary, otherwise switch
* to standby monitoring
*/
if (check_primary_status(-1) == false)
if (check_primary_status(NO_DEGRADED_MONITORING_ELAPSED) == false)
return;
goto loop;
@@ -423,7 +423,7 @@ monitor_streaming_primary(void)
loop:
/* check node is still primary, if not restart monitoring */
if (check_primary_status(-1) == false)
if (check_primary_status(NO_DEGRADED_MONITORING_ELAPSED) == false)
return;
/* emit "still alive" log message at regular intervals, if requested */