From d7894f3969fd3932eef57d9759f01282c7d76aa5 Mon Sep 17 00:00:00 2001 From: Anatoli Papirovski Date: Wed, 31 Jan 2018 11:08:25 -0500 Subject: [PATCH] timers: use start instead of stop + start Instead of calling stop + start from the refresh method of Timeout, instead just call start as libuv already calls stop if necessary. PR-URL: https://github.com/nodejs/node/pull/18486 Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater Reviewed-By: Jeremiah Senkpiel --- lib/internal/timers.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/internal/timers.js b/lib/internal/timers.js index aa061be3dbf845..df2a88558fd6e3 100644 --- a/lib/internal/timers.js +++ b/lib/internal/timers.js @@ -85,7 +85,6 @@ Timeout.prototype[refreshFnSymbol] = function refresh() { // Would be more ideal with uv_timer_again(), however that API does not // cause libuv's sorted timers data structure (a binary heap at the time // of writing) to re-sort itself. This causes ordering inconsistencies. - this._handle.stop(); this._handle.start(this._idleTimeout); } else if (this[unrefedSymbol]) { getTimers()._unrefActive(this);