<div dir="ltr"><div>When send() returned zero, the errno won't be set.</div><div>So, it's meaningless here.</div><div><br></div><div># HG changeset patch</div><div># User Jianjun Zheng <<a href="mailto:codeeply@gmail.com">codeeply@gmail.com</a>></div>
<div># Date 1402330476 -28800</div><div># Tue Jun 10 00:14:36 2014 +0800</div><div># Node ID 77e5822468c8619dcc3c7ad35f906763d34292a1</div><div># Parent 7f425d67f91ae3966b4f31b33dcd0386977a97a4</div><div>Unix: remove errno logging when send() returned zero.</div>
<div><br></div><div>diff -r 7f425d67f91a -r 77e5822468c8 src/os/unix/ngx_send.c</div><div>--- a/src/os/unix/ngx_send.c Tue Jun 03 10:53:48 2014 -0700</div><div>+++ b/src/os/unix/ngx_send.c Tue Jun 10 00:14:36 2014 +0800</div>
<div>@@ -46,14 +46,14 @@</div><div> return n;</div><div> }</div><div><br></div><div>- err = ngx_socket_errno;</div><div>-</div><div> if (n == 0) {</div><div>- ngx_log_error(NGX_LOG_ALERT, c->log, err, "send() returned zero");</div>
<div>+ ngx_log_error(NGX_LOG_ALERT, c->log, 0, "send() returned zero");</div><div> wev->ready = 0;</div><div> return n;</div><div> }</div><div><br></div><div>+ err = ngx_socket_errno;</div>
<div>+</div><div> if (err == NGX_EAGAIN || err == NGX_EINTR) {</div><div> wev->ready = 0;</div><div><br></div></div>