diff --git a/test/parallel/test-timers-unref.js b/test/parallel/test-timers-unref.js index c4f9d820e5601f..9434dbbd36ad78 100644 --- a/test/parallel/test-timers-unref.js +++ b/test/parallel/test-timers-unref.js @@ -21,7 +21,8 @@ setTimeout(function() { interval = setInterval(function() { unref_interval = true; clearInterval(interval); -}, SHORT_TIME).unref(); +}, SHORT_TIME); +interval.unref(); setTimeout(function() { unref_timer = true;