|
|
|
@ -235,7 +235,8 @@ static int prepare_socket(int fd, const struct sockaddr *addr, int addr_len) { |
|
|
|
|
|
|
|
|
|
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_set_socket_reuse_addr(fd, 1)))) { |
|
|
|
|
!grpc_set_socket_reuse_addr(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; |
|
|
|
@ -296,6 +297,8 @@ static void on_read(void *arg, int success) { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
grpc_set_socket_no_sigpipe_if_possible(fd); |
|
|
|
|
|
|
|
|
|
sp->server->cb( |
|
|
|
|
sp->server->cb_arg, |
|
|
|
|
grpc_tcp_create(grpc_fd_create(fd), GRPC_TCP_DEFAULT_READ_SLICE_SIZE)); |
|
|
|
|