]> git.kaiwu.me - nginx.git/commitdiff
Core: silenced getsockopt(TCP_FASTOPEN) messages on FreeBSD.
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 21 May 2018 20:11:27 +0000 (23:11 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 21 May 2018 20:11:27 +0000 (23:11 +0300)
FreeBSD returns EINVAL when getsockopt(TCP_FASTOPEN) is called on a unix
domain socket, resulting in "getsockopt(TCP_FASTOPEN) ... failed" messages
during binary upgrade when unix domain listen sockets are present in
the configuration.  Added EINVAL to the list of ignored error codes.

src/core/ngx_connection.c

index 9a747589c2ba2273ec4335ed849c51f5c3be6531..878c6be19b86ea5a8c21eb51581ddbb3fd9672ce 100644 (file)
@@ -305,7 +305,9 @@ ngx_set_inherited_sockets(ngx_cycle_t *cycle)
         {
             err = ngx_socket_errno;
 
-            if (err != NGX_EOPNOTSUPP && err != NGX_ENOPROTOOPT) {
+            if (err != NGX_EOPNOTSUPP && err != NGX_ENOPROTOOPT
+                && err != NGX_EINVAL)
+            {
                 ngx_log_error(NGX_LOG_NOTICE, cycle->log, err,
                               "getsockopt(TCP_FASTOPEN) %V failed, ignored",
                               &ls[i].addr_text);