From 317f68e5b28a62c30f176d991bc190210133c2a0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 13 Apr 2016 20:27:24 -0700 Subject: [PATCH] Fix timer init --- src/core/lib/iomgr/timer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/lib/iomgr/timer.c b/src/core/lib/iomgr/timer.c index c4dfc09c9d1..5ebbbb270d6 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; }