diff src/event/ngx_event_accept.c @ 92:19cc647ecd91

nginx-0.0.1-2003-05-20-19:37:55 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 20 May 2003 15:37:55 +0000
parents 637625a2acdb
children 738fe44c70d5
line wrap: on
line diff
--- a/src/event/ngx_event_accept.c
+++ b/src/event/ngx_event_accept.c
@@ -32,6 +32,11 @@ void ngx_event_accept(ngx_event_t *ev)
 #endif
 
     do {
+
+        /* Create the pool before accept() to avoid copy the sockaddr.
+           Although accept() can fail it's uncommon case
+           and the pool can be got from the free pool list */
+
         pool = ngx_create_pool(ls->pool_size, ev->log);
         if (pool == NULL) {
             return;