Control API: warn in single process mode only if API is enabled

Previously, the "control API unavailable in single process mode"
warning was logged on every start in single process mode, even
without the "-l" option.
This commit is contained in:
Piotr Przybylski 2026-10-25 13:54:45 +01:00 • committed by Ava Hahn
parent a4b482207d
commit f7504639fa

View file

@ -368,7 +368,7 @@ main(int argc, char *const *argv)
#endif
#if (NGX_CONTROL_API)
if (ngx_process == NGX_PROCESS_SINGLE) {
if (ngx_control_api_enabled && ngx_process == NGX_PROCESS_SINGLE) {
ngx_log_error(NGX_LOG_WARN, cycle->log, 0,
"control API unavailable in single process mode");