[nginx] Fixed handling of the ready flag with kqueue.

Valentin Bartenev vbart at nginx.com
Thu Sep 5 13:07:57 UTC 2013


details:   http://hg.nginx.org/nginx/rev/ee78c7705a8e
branches:  
changeset: 5370:ee78c7705a8e
user:      Valentin Bartenev <vbart at nginx.com>
date:      Thu Sep 05 16:53:02 2013 +0400
description:
Fixed handling of the ready flag with kqueue.

There is nothing to do more when recv() has returned 0,
so we should drop the flag.

diffstat:

 src/os/unix/ngx_readv_chain.c |  1 +
 src/os/unix/ngx_recv.c        |  1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diffs (22 lines):

diff -r 907f01a2a7c0 -r ee78c7705a8e src/os/unix/ngx_readv_chain.c
--- a/src/os/unix/ngx_readv_chain.c	Tue Sep 03 21:07:19 2013 +0400
+++ b/src/os/unix/ngx_readv_chain.c	Thu Sep 05 16:53:02 2013 +0400
@@ -129,6 +129,7 @@ ngx_readv_chain(ngx_connection_t *c, ngx
                                   "%d available bytes", rev->available);
 #endif
 
+                    rev->ready = 0;
                     rev->eof = 1;
                     rev->available = 0;
                 }
diff -r 907f01a2a7c0 -r ee78c7705a8e src/os/unix/ngx_recv.c
--- a/src/os/unix/ngx_recv.c	Tue Sep 03 21:07:19 2013 +0400
+++ b/src/os/unix/ngx_recv.c	Thu Sep 05 16:53:02 2013 +0400
@@ -80,6 +80,7 @@ ngx_unix_recv(ngx_connection_t *c, u_cha
                      * even if kqueue reported about available data
                      */
 
+                    rev->ready = 0;
                     rev->eof = 1;
                     rev->available = 0;
                 }



More information about the nginx-devel mailing list