Commit 2269b99b authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Merge branch 'unix-tcp-nodelay' of https://github.com/rraptorr/nghttp2 into...

Merge branch 'unix-tcp-nodelay' of https://github.com/rraptorr/nghttp2 into rraptorr-unix-tcp-nodelay
parents 50ec17c4 84f96a2f
...@@ -721,12 +721,12 @@ ClientHandler *accept_connection(Worker *worker, int fd, sockaddr *addr, ...@@ -721,12 +721,12 @@ ClientHandler *accept_connection(Worker *worker, int fd, sockaddr *addr,
return nullptr; return nullptr;
} }
int val = 1; if (addr->sa_family != AF_UNIX) {
rv = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast<char *>(&val), rv = util::make_socket_nodelay(fd);
sizeof(val));
if (rv == -1) { if (rv == -1) {
LOG(WARN) << "Setting option TCP_NODELAY failed: errno=" << errno; LOG(WARN) << "Setting option TCP_NODELAY failed: errno=" << errno;
} }
}
SSL *ssl = nullptr; SSL *ssl = nullptr;
auto ssl_ctx = worker->get_sv_ssl_ctx(); auto ssl_ctx = worker->get_sv_ssl_ctx();
if (ssl_ctx) { if (ssl_ctx) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment