errno bug in ngx_unix_recv().

jiakai1000 at gmail.com jiakai1000 at gmail.com
Wed Apr 8 04:16:50 UTC 2015


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.



jiakai1000 at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20150408/a4c4d00f/attachment.html>


More information about the nginx-devel mailing list