aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/iomgr/tcp_client_posix_test.c
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nnoble@google.com>2015-01-26 11:41:12 -0800
committerGravatar Nicolas Noble <nnoble@google.com>2015-01-26 11:41:12 -0800
commitfee065c1c7f01207c0e484c92681cea184b1983a (patch)
tree11baf429fdee72a169bdb0b1d17f16154ab5186a /test/core/iomgr/tcp_client_posix_test.c
parent614c2bf99b1865761e5a05a56faf1ad8f26138ff (diff)
parentc41704bada0dc8974e7063f84dae934931813811 (diff)
Merge branch 'master' of github.com:google/grpc into json
Conflicts: src/core/security/credentials.c
Diffstat (limited to 'test/core/iomgr/tcp_client_posix_test.c')
-rw-r--r--test/core/iomgr/tcp_client_posix_test.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/core/iomgr/tcp_client_posix_test.c b/test/core/iomgr/tcp_client_posix_test.c
index 79ba777e85..f9212e7373 100644
--- a/test/core/iomgr/tcp_client_posix_test.c
+++ b/test/core/iomgr/tcp_client_posix_test.c
@@ -40,6 +40,7 @@
#include <unistd.h>
#include "src/core/iomgr/iomgr.h"
+#include "src/core/iomgr/socket_utils_posix.h"
#include <grpc/support/log.h>
#include <grpc/support/time.h>
@@ -138,7 +139,8 @@ void test_times_out(void) {
/* tie up the listen buffer, which is somewhat arbitrarily sized. */
for (i = 0; i < NUM_CLIENT_CONNECTS; ++i) {
- client_fd[i] = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0);
+ client_fd[i] = socket(AF_INET, SOCK_STREAM, 0);
+ grpc_set_socket_nonblocking(client_fd[i], 1);
do {
r = connect(client_fd[i], (struct sockaddr *)&addr, addr_len);
} while (r == -1 && errno == EINTR);