This fixes the case when a server is shutdown right after it Accept'ed
a connection. The socket needs to be closed right before the endpoint
is destroyed.
pull/11224/head
Makarand Dharmapurikar 8 years ago
parent 656bbbef41
commit 9c156da66a
  1. 1
      src/core/ext/transport/chttp2/server/chttp2_server.c

@ -127,6 +127,7 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp,
gpr_mu_lock(&state->mu);
if (state->shutdown) {
gpr_mu_unlock(&state->mu);
grpc_endpoint_shutdown(exec_ctx, tcp, GRPC_ERROR_NONE);
grpc_endpoint_destroy(exec_ctx, tcp);
gpr_free(acceptor);
return;

Loading…
Cancel
Save