diff options
author | Alexander Polcyn <apolcyn@google.com> | 2017-03-22 10:27:31 -0700 |
---|---|---|
committer | Alexander Polcyn <apolcyn@google.com> | 2017-03-22 10:27:31 -0700 |
commit | 513070cf20c973727c7f5899ac9018f7fd349b1f (patch) | |
tree | fe8359556d59a0ca95bffb813ad97326b3c18adc /src/ruby/ext/grpc/rb_channel.c | |
parent | 06d4edd28355877e71733a0d246a9b5b4c67452b (diff) |
get rid of time check increment in watch connectivity state loop
Diffstat (limited to 'src/ruby/ext/grpc/rb_channel.c')
-rw-r--r-- | src/ruby/ext/grpc/rb_channel.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/ruby/ext/grpc/rb_channel.c b/src/ruby/ext/grpc/rb_channel.c index acf22dd46b..ba23052521 100644 --- a/src/ruby/ext/grpc/rb_channel.c +++ b/src/ruby/ext/grpc/rb_channel.c @@ -259,7 +259,6 @@ static void *watch_channel_state_without_gvl(void *arg) { grpc_rb_channel *wrapper = stack->wrapper; int last_state = stack->last_state; void *return_value = (void*)0; - gpr_timespec time_check_increment; gpr_mu_lock(&wrapper->channel_mu); while(wrapper->current_connectivity_state == last_state && @@ -267,9 +266,7 @@ static void *watch_channel_state_without_gvl(void *arg) { !wrapper->safe_to_destroy && !wrapper->abort_watch_connectivity_state && gpr_time_cmp(deadline, gpr_now(GPR_CLOCK_REALTIME)) > 0) { - time_check_increment = gpr_time_add( - gpr_now(GPR_CLOCK_REALTIME), gpr_time_from_millis(20, GPR_TIMESPAN)); - gpr_cv_wait(&wrapper->channel_cv, &wrapper->channel_mu, time_check_increment); + gpr_cv_wait(&wrapper->channel_cv, &wrapper->channel_mu, deadline); } if (wrapper->current_connectivity_state != last_state) { return_value = (void*)1; |