diff options
Diffstat (limited to 'src/ruby')
-rw-r--r-- | src/ruby/ext/grpc/rb_channel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ruby/ext/grpc/rb_channel.c b/src/ruby/ext/grpc/rb_channel.c index 9a3f82c2b7..2489ec2fef 100644 --- a/src/ruby/ext/grpc/rb_channel.c +++ b/src/ruby/ext/grpc/rb_channel.c @@ -402,7 +402,7 @@ static void grpc_rb_channel_try_register_connection_polling( // Note requires wrapper->wrapped, wrapper->safe_destroy_mu/cv initialized static void grpc_rb_channel_safe_destroy(grpc_rb_channel *wrapper) { gpr_mu_lock(&wrapper->safe_destroy_mu); - if (!wrapper->safe_to_destroy) { + while (!wrapper->safe_to_destroy) { wrapper->request_safe_destroy = 1; gpr_cv_wait(&wrapper->safe_destroy_cv, &wrapper->safe_destroy_mu, gpr_inf_future(GPR_CLOCK_REALTIME)); |