aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-04-13 20:27:24 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-04-13 20:27:24 -0700
commit317f68e5b28a62c30f176d991bc190210133c2a0 (patch)
tree276e845f3cc4ec2871dfb177cdf6b2908d1853b1
parent3f72df99993a4905e280c7a5ad86da5fcd8a40d5 (diff)
Fix timer init
-rw-r--r--src/core/lib/iomgr/timer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/lib/iomgr/timer.c b/src/core/lib/iomgr/timer.c
index c4dfc09c9d..5ebbbb270d 100644
--- a/src/core/lib/iomgr/timer.c
+++ b/src/core/lib/iomgr/timer.c
@@ -70,6 +70,7 @@ static gpr_clock_type g_clock_type;
static shard_type g_shards[NUM_SHARDS];
/* Protected by g_mu */
static shard_type *g_shard_queue[NUM_SHARDS];
+static bool g_initialized = false;
static int run_some_expired_timers(grpc_exec_ctx *exec_ctx, gpr_timespec now,
gpr_timespec *next, int success);
@@ -183,12 +184,12 @@ void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer,
timer->triggered = 0;
if (!g_initialized) {
- grpc_exec_ctx_enqueue(exec_ctx, &timer->closure, false);
+ grpc_exec_ctx_enqueue(exec_ctx, &timer->closure, false, NULL);
return;
}
if (gpr_time_cmp(deadline, now) <= 0) {
- grpc_exec_ctx_enqueue(exec_ctx, &timer->closure, true);
+ grpc_exec_ctx_enqueue(exec_ctx, &timer->closure, true, NULL);
return;
}