Skip to content

Commit

Permalink
Fixing bad_client test.
Browse files Browse the repository at this point in the history
Before destroying an endpoint, shut it down properly.
  • Loading branch information
nicolasnoble committed Sep 4, 2015
1 parent 2d96240 commit 2057a7a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/core/bad_client/bad_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ void grpc_run_bad_client_test(grpc_bad_client_server_side_validator validator,
gpr_event_wait(&a.done_write, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5)));

if (flags & GRPC_BAD_CLIENT_DISCONNECT) {
grpc_endpoint_shutdown(sfd.client);
grpc_endpoint_destroy(sfd.client);
sfd.client = NULL;
}
Expand All @@ -153,6 +154,7 @@ void grpc_run_bad_client_test(grpc_bad_client_server_side_validator validator,

/* Shutdown */
if (sfd.client) {
grpc_endpoint_shutdown(sfd.client);
grpc_endpoint_destroy(sfd.client);
}
grpc_server_shutdown_and_notify(a.server, a.cq, NULL);
Expand Down

0 comments on commit 2057a7a

Please sign in to comment.