aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/dualstack_socket_test.c
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-05-18 15:06:21 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-05-18 15:06:21 -0700
commit9780f59a06ebe8a2f4c971f2984d3236a027392c (patch)
treeb5019158a1407d048ce274647f9ad3d3b8794e9a /test/core/end2end/dualstack_socket_test.c
parent68897999237ab5d67278365b3bd444960fa3c4c0 (diff)
parentfcbe7daf832dcb616fc93ca59c3b1aab279f510e (diff)
Merge github.com:grpc/grpc into signal_handler
Diffstat (limited to 'test/core/end2end/dualstack_socket_test.c')
-rw-r--r--test/core/end2end/dualstack_socket_test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/core/end2end/dualstack_socket_test.c b/test/core/end2end/dualstack_socket_test.c
index 81f76ea79c..202fb3b6a8 100644
--- a/test/core/end2end/dualstack_socket_test.c
+++ b/test/core/end2end/dualstack_socket_test.c
@@ -88,9 +88,11 @@ void test_connect(const char *server_host, const char *client_host, int port,
int was_cancelled = 2;
grpc_call_details call_details;
char *peer;
+ int picked_port = 0;
if (port == 0) {
port = grpc_pick_unused_port_or_die();
+ picked_port = 1;
}
gpr_join_host_port(&server_hostport, server_host, port);
@@ -263,6 +265,9 @@ void test_connect(const char *server_host, const char *client_host, int port,
grpc_call_details_destroy(&call_details);
gpr_free(details);
+ if (picked_port) {
+ grpc_recycle_unused_port(port);
+ }
}
int external_dns_works(const char *host) {