Skip to content

Commit

Permalink
Merge branch 'rraptorr-unix-tcp-nodelay'
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsuhiro-t committed Sep 23, 2015
2 parents 50ec17c + 2269b99 commit fec7ef6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/shrpx_ssl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -721,11 +721,11 @@ 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 (rv == -1) {
LOG(WARN) << "Setting option TCP_NODELAY failed: errno=" << errno;
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();
Expand Down

0 comments on commit fec7ef6

Please sign in to comment.