diff src/event/ngx_event_accept.c @ 377:41437e4fd9b4

nginx-0.0.7-2004-07-05-19:08:23 import
author Igor Sysoev <igor@sysoev.ru>
date Mon, 05 Jul 2004 15:08:23 +0000
parents 213f17e9f776
children 73688d5d7fc3
line wrap: on
line diff
--- a/src/event/ngx_event_accept.c
+++ b/src/event/ngx_event_accept.c
@@ -210,12 +210,17 @@ void ngx_event_accept(ngx_event_t *ev)
         rinstance = rev->returned_instance;
         winstance = wev->returned_instance;
 
+#if (NGX_THREADS)
+        if (*(rev->lock)) {
+            ngx_spinlock(rev->lock, 1000);
+            ngx_unlock(rev->lock);
+        }
+#endif
+
         ngx_memzero(rev, sizeof(ngx_event_t));
         ngx_memzero(wev, sizeof(ngx_event_t));
         ngx_memzero(c, sizeof(ngx_connection_t));
 
-        /* ngx_memzero(c) does ngx_unlock(&c->lock); */
-
         c->pool = pool;
 
         c->listening = ls->listening;