diff options
author | Yuchen Zeng <zyc@google.com> | 2016-08-08 20:44:36 -0700 |
---|---|---|
committer | Yuchen Zeng <zyc@google.com> | 2016-08-08 20:44:36 -0700 |
commit | d745a6f682a9aaab0f20fc4ba8bfc17920e0604b (patch) | |
tree | 90ddbf33fd112ef4f1ad4166b92739400b101e52 /src | |
parent | 50be893eba595a8cf270da3e59edd87128b854c9 (diff) |
Disable SO_REUSEPORT for UNIX socket
Diffstat (limited to 'src')
-rw-r--r-- | src/core/lib/iomgr/tcp_server_posix.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 38ebd2dbcb..475bb6068f 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -685,7 +685,8 @@ void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, s->pollset_count = pollset_count; sp = s->head; while (sp != NULL) { - if (s->so_reuseport && pollset_count > 1) { + if (s->so_reuseport && !grpc_is_unix_socket(&sp->addr.sockaddr) && + pollset_count > 1) { GPR_ASSERT(GRPC_LOG_IF_ERROR( "clone_port", clone_port(sp, (unsigned)(pollset_count - 1)))); for (i = 0; i < pollset_count; i++) { |