Skip to content
Snippets Groups Projects
Commit 04a841f2 authored by Nicolas "Pixel" Noble's avatar Nicolas "Pixel" Noble
Browse files

Fixing recursive locking under Windows.

Shutting down is synchronous under Windows, so we don't want to do that while holding a lock.
parent 3e5964f8
No related branches found
No related tags found
No related merge requests found
...@@ -138,10 +138,12 @@ static void destroy_done(void *statep) { ...@@ -138,10 +138,12 @@ static void destroy_done(void *statep) {
callbacks) */ callbacks) */
static void destroy(grpc_server *server, void *statep) { static void destroy(grpc_server *server, void *statep) {
grpc_server_secure_state *state = statep; grpc_server_secure_state *state = statep;
grpc_tcp_server *tcp;
gpr_mu_lock(&state->mu); gpr_mu_lock(&state->mu);
state->is_shutdown = 1; state->is_shutdown = 1;
grpc_tcp_server_destroy(state->tcp, destroy_done, state); tcp = state->tcp;
gpr_mu_unlock(&state->mu); gpr_mu_unlock(&state->mu);
grpc_tcp_server_destroy(tcp, destroy_done, state);
} }
int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment