diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2017-03-27 18:50:04 +0200 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2017-03-27 18:50:04 +0200 |
commit | 8e0684b5d4b69670797d9d297a317aacd7236548 (patch) | |
tree | 9eaafb090247ce9b08015c90ac1062f4a10acca9 /src/core/lib/iomgr/timer_uv.c | |
parent | b02dd01584e21565ebea173ceee7568404d23f2b (diff) | |
parent | c4478a103b68100b86f506061cedcb0ce70016ba (diff) |
Merge branch 'master' of https://github.com/grpc/grpc into cpp_bazelness
Diffstat (limited to 'src/core/lib/iomgr/timer_uv.c')
-rw-r--r-- | src/core/lib/iomgr/timer_uv.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/timer_uv.c b/src/core/lib/iomgr/timer_uv.c index f28a14405d..8e8a07578c 100644 --- a/src/core/lib/iomgr/timer_uv.c +++ b/src/core/lib/iomgr/timer_uv.c @@ -78,6 +78,10 @@ void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer, uv_timer->data = timer; timer->uv_timer = uv_timer; uv_timer_start(uv_timer, run_expired_timer, timeout, 0); + /* We assume that gRPC timers are only used alongside other active gRPC + objects, and that there will therefore always be something else keeping + the uv loop alive whenever there is a timer */ + uv_unref((uv_handle_t *)uv_timer); } void grpc_timer_cancel(grpc_exec_ctx *exec_ctx, grpc_timer *timer) { |