]> git.kaiwu.me - nginx.git/commit
Core: added support for TCP keepalive parameters on macOS.
authorSergey Kandaurov <pluknet@nginx.com>
Mon, 26 May 2025 12:11:36 +0000 (16:11 +0400)
committerpluknet <pluknet@nginx.com>
Mon, 26 May 2025 21:59:02 +0000 (01:59 +0400)
commit5b8a5c08ce28639e788734b2528faad70baa113c
treefd3f3029d17f3f15913db39d017651c0996acb78
parent3d5889a3ee41a282bad54d9c0d3662dba9f52c1b
Core: added support for TCP keepalive parameters on macOS.

The support first appeared in OS X Mavericks 10.9 and documented since
OS X Yosemite 10.10.

It has a subtle implementation difference from other operating systems
in that the TCP_KEEPALIVE socket option (used in place of TCP_KEEPIDLE)
isn't inherited from a listening socket to an accepted socket.

An apparent reason for this behaviour is that it might be preserved for
the sake of backward compatibility.  The TCP_KEEPALIVE socket option is
not inherited since appearance in OS X Panther 10.3, which long predates
two other TCP_KEEPINTVL and TCP_KEEPCNT socket options.

Thanks to Andy Pan for initial work.
auto/os/darwin
auto/unix
src/core/ngx_connection.c
src/event/ngx_event_accept.c