aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/timer_uv.cc
diff options
context:
space:
mode:
authorGravatar kpayson64 <kpayson@google.com>2018-04-11 20:40:56 -0700
committerGravatar kpayson64 <kpayson@google.com>2018-04-20 16:13:13 -0700
commitd93f3e376b6e66efd9b95f1f9e8971cd9e3c133b (patch)
treedb158cce53bb36422411168da1db74a5f35b3604 /src/core/lib/iomgr/timer_uv.cc
parent8391e17adc1d33dc4a0464e82a599f1a9b3acaff (diff)
Unref uv timers/tcp handles
Diffstat (limited to 'src/core/lib/iomgr/timer_uv.cc')
-rw-r--r--src/core/lib/iomgr/timer_uv.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/timer_uv.cc b/src/core/lib/iomgr/timer_uv.cc
index dadeb960b2..8b7c82eb7d 100644
--- a/src/core/lib/iomgr/timer_uv.cc
+++ b/src/core/lib/iomgr/timer_uv.cc
@@ -52,6 +52,9 @@ static void timer_start(grpc_custom_timer* t) {
uv_timer->data = t;
t->timer = (void*)uv_timer;
uv_timer_start(uv_timer, run_expired_timer, t->timeout_ms, 0);
+ // Node uses a garbage collector to call destructors, so we don't
+ // want to hold the uv loop open with active gRPC objects.
+ uv_unref((uv_handle_t*)uv_timer);
}
static void timer_stop(grpc_custom_timer* t) {