We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91704ac commit 02126e8Copy full SHA for 02126e8
src/server/port.cc
@@ -166,6 +166,17 @@ int ListenPort::listen() {
166
}
167
#endif
168
169
+#ifdef SO_ACCEPTFILTER
170
+ if (tcp_defer_accept) {
171
+ struct accept_filter_arg a;
172
+ memset(&a, 0, sizeof(a));
173
+ strcpy(a.af_name, "httpready");
174
+ if (socket->set_option(SOL_SOCKET, SO_ACCEPTFILTER, &a, sizeof(a)) != 0) {
175
+ swSysWarn("setsockopt(SO_ACCEPTFILTER) failed");
176
+ }
177
178
+#endif
179
+
180
#ifdef TCP_FASTOPEN
181
if (tcp_fastopen) {
182
if (socket->set_option(IPPROTO_TCP, TCP_FASTOPEN, tcp_fastopen) != 0) {
0 commit comments