Commit 84f96a2f authored by Janusz Dziemidowicz's avatar Janusz Dziemidowicz

Do not try to set TCP_NODELAY when frontend is an UNIX socket

This silences warning log that otherwise spams logs on every accepted
connection.
parent 87a38bdf
......@@ -721,12 +721,12 @@ ClientHandler *accept_connection(Worker *worker, int fd, sockaddr *addr,
return nullptr;
}
int val = 1;
rv = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast<char *>(&val),
sizeof(val));
if (addr->sa_family != AF_UNIX) {
rv = util::make_socket_nodelay(fd);
if (rv == -1) {
LOG(WARN) << "Setting option TCP_NODELAY failed: errno=" << errno;
}
}
SSL *ssl = nullptr;
auto ssl_ctx = worker->get_sv_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