[PATCH] Unix: remove errno logging when send() returned zero.
Jianjun Zheng
codeeply at gmail.com
Mon Jun 9 16:54:12 UTC 2014
When send() returned zero, the errno won't be set.
So, it's meaningless here.
# HG changeset patch
# User Jianjun Zheng <codeeply at gmail.com>
# Date 1402330476 -28800
# Tue Jun 10 00:14:36 2014 +0800
# Node ID 77e5822468c8619dcc3c7ad35f906763d34292a1
# Parent 7f425d67f91ae3966b4f31b33dcd0386977a97a4
Unix: remove errno logging when send() returned zero.
diff -r 7f425d67f91a -r 77e5822468c8 src/os/unix/ngx_send.c
--- a/src/os/unix/ngx_send.c Tue Jun 03 10:53:48 2014 -0700
+++ b/src/os/unix/ngx_send.c Tue Jun 10 00:14:36 2014 +0800
@@ -46,14 +46,14 @@
return n;
}
- err = ngx_socket_errno;
-
if (n == 0) {
- ngx_log_error(NGX_LOG_ALERT, c->log, err, "send() returned
zero");
+ ngx_log_error(NGX_LOG_ALERT, c->log, 0, "send() returned
zero");
wev->ready = 0;
return n;
}
+ err = ngx_socket_errno;
+
if (err == NGX_EAGAIN || err == NGX_EINTR) {
wev->ready = 0;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20140610/e156e9e7/attachment.html>
More information about the nginx-devel
mailing list