errno bug in ngx_unix_recv().

2015-04-07 Thread jiakai1...@gmail.com
src/os/unix/ngx_recv.c

in function:
ssize_t ngx_unix_recv(ngx_connection_t *c, u_char *buf, size_t size)

 err = ngx_socket_errno; 
should before
 ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0,"recv: fd:%d %d of %d", c->fd, 
n, size);

because ngx_log_debug3 may change errno, for example change errno from EAGAIN 
to EPIPE.



[email protected]
___
nginx-devel mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx-devel

errno bug in ngx_unix_recv().

2015-04-08 Thread jiakai1...@gmail.com
src/os/unix/ngx_recv.c
in function:
ssize_t ngx_unix_recv(ngx_connection_t *c, u_char *buf, size_t size)
 err = ngx_socket_errno; 
should before
 ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0,"recv: fd:%d %d of %d", c->fd, 
n, size);
because ngx_log_debug3 may change errno, for example change errno from EAGAIN 
to EPIPE.
___
nginx-devel mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx-devel