|
|
|
@ -146,7 +146,8 @@ static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_udp_server *s) { |
|
|
|
|
gpr_free(s); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void destroyed_port(grpc_exec_ctx *exec_ctx, void *server, int success) { |
|
|
|
|
static void destroyed_port(grpc_exec_ctx *exec_ctx, void *server, |
|
|
|
|
bool success) { |
|
|
|
|
grpc_udp_server *s = server; |
|
|
|
|
gpr_mu_lock(&s->mu); |
|
|
|
|
s->destroyed_ports++; |
|
|
|
@ -263,10 +264,10 @@ error: |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* event manager callback when reads are ready */ |
|
|
|
|
static void on_read(grpc_exec_ctx *exec_ctx, void *arg, int success) { |
|
|
|
|
static void on_read(grpc_exec_ctx *exec_ctx, void *arg, bool success) { |
|
|
|
|
server_port *sp = arg; |
|
|
|
|
|
|
|
|
|
if (success == 0) { |
|
|
|
|
if (!success) { |
|
|
|
|
gpr_mu_lock(&sp->server->mu); |
|
|
|
|
if (0 == --sp->server->active_ports) { |
|
|
|
|
gpr_mu_unlock(&sp->server->mu); |
|
|
|
|