]> git.kaiwu.me - nginx.git/commit
Events: support for SO_SNDBUF on outbound peer connections
authorPatrik Wall <patrik.wall.91@gmail.com>
Thu, 30 Apr 2026 12:43:49 +0000 (14:43 +0200)
committerSergey Kandaurov <s.kandaurov@f5.com>
Wed, 15 Jul 2026 12:59:06 +0000 (16:59 +0400)
commit3fe9fc45735b059ab6d3ee997e06bcc6850b36ab
tree988049e18cf36d58687183f9d6266b6474772b78
parenta277069b1473936add8b9fc8660bf9a466ff96af
Events: support for SO_SNDBUF on outbound peer connections

ngx_event_connect_peer() honors SO_RCVBUF via pc->rcvbuf but had
no equivalent for SO_SNDBUF.  This adds pc->sndbuf and the matching
setsockopt() call, mirroring the existing SO_RCVBUF path.
Both setsockopt() calls are made non-fatal.

Existing callers leaving sndbuf at 0 retain prior behavior, since
setsockopt() is only invoked when the field is non-zero.  These
fields are consumed by various proxying modules in follow-up commits.
src/event/ngx_event_connect.c
src/event/ngx_event_connect.h