The `reload_status` is set to `NAMED_RELOAD_FAILED` after the log line is
printed about this change. Update `reload_status` first, to avoid
(unlikely) case where a test waiting for this log line would attempt a
RNDC reload query but it would be processed by `named` before the status
is updated.
ISC_LOG_INFO,
"reloading configuration succeeded");
} else {
+ atomic_store(&server->reload_status, NAMED_RELOAD_FAILED);
isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
ISC_LOG_ERROR,
"reloading configuration failed: %s",
isc_result_totext(result));
- atomic_store(&server->reload_status, NAMED_RELOAD_FAILED);
}
return result;