diff options
author | 2016-03-23 14:57:52 -0700 | |
---|---|---|
committer | 2016-03-23 14:57:52 -0700 | |
commit | 995bc78441cbd58fe026644265c204d2a2a7551b (patch) | |
tree | dfa81e4a49ab5b77c0313c9acc6b09a260aafb43 /src/core/iomgr/tcp_client_posix.c | |
parent | e5b19fe84f0c4b473872632553b3cf5b21e82e60 (diff) | |
parent | 634e67617b3b445185b5485f493b591b53b35d9d (diff) |
Merge github.com:grpc/grpc into fuzzy-bits
Diffstat (limited to 'src/core/iomgr/tcp_client_posix.c')
-rw-r--r-- | src/core/iomgr/tcp_client_posix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/iomgr/tcp_client_posix.c b/src/core/iomgr/tcp_client_posix.c index 15727856ab..1d3f9b6555 100644 --- a/src/core/iomgr/tcp_client_posix.c +++ b/src/core/iomgr/tcp_client_posix.c @@ -54,6 +54,7 @@ #include "src/core/iomgr/socket_utils_posix.h" #include "src/core/iomgr/tcp_posix.h" #include "src/core/iomgr/timer.h" +#include "src/core/iomgr/unix_sockets_posix.h" #include "src/core/support/string.h" extern int grpc_tcp_trace; @@ -77,13 +78,12 @@ static int prepare_socket(const struct sockaddr *addr, int fd) { } if (!grpc_set_socket_nonblocking(fd, 1) || !grpc_set_socket_cloexec(fd, 1) || - (addr->sa_family != AF_UNIX && !grpc_set_socket_low_latency(fd, 1)) || + (!grpc_is_unix_socket(addr) && !grpc_set_socket_low_latency(fd, 1)) || !grpc_set_socket_no_sigpipe_if_possible(fd)) { gpr_log(GPR_ERROR, "Unable to configure socket %d: %s", fd, strerror(errno)); goto error; } - return 1; error: |