]> git.kaiwu.me - nginx.git/commitdiff
Win32: timer_resolution now ignored with select.
authorMaxim Dounin <mdounin@mdounin.ru>
Tue, 20 Oct 2015 15:16:18 +0000 (18:16 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Tue, 20 Oct 2015 15:16:18 +0000 (18:16 +0300)
As setitimer() isn't available on Windows, time wasn't updated at all
if timer_resolution was used with the select event method.  Fix is
to ignore timer_resolution in such cases.

src/event/ngx_event.c

index b8e06077e6624915f03cc32ed6336b440b20de46..15da213405e85292dfce7e2f1613b64528ca9b46 100644 (file)
@@ -670,6 +670,15 @@ ngx_event_process_init(ngx_cycle_t *cycle)
         }
     }
 
+#else
+
+    if (ngx_timer_resolution && !(ngx_event_flags & NGX_USE_TIMER_EVENT)) {
+        ngx_log_error(NGX_LOG_WARN, cycle->log, 0,
+                      "the \"timer_resolution\" directive is not supported "
+                      "with the configured event method, ignored");
+        ngx_timer_resolution = 0;
+    }
+
 #endif
 
     cycle->connections =