aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatoli Papirovski <apapirovski@mac.com>2018-01-31 11:08:25 -0500
committerAnatoli Papirovski <apapirovski@mac.com>2018-02-04 11:04:12 -0500
commitd7894f3969fd3932eef57d9759f01282c7d76aa5 (patch)
tree19e045f2571a1305e94d47c4d18db77ed436fbb3
parent71c0d0370a98c50c4b49659bd6ece3359437902c (diff)
downloadandroid-node-v8-d7894f3969fd3932eef57d9759f01282c7d76aa5.tar.gz
android-node-v8-d7894f3969fd3932eef57d9759f01282c7d76aa5.tar.bz2
android-node-v8-d7894f3969fd3932eef57d9759f01282c7d76aa5.zip
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 <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
-rw-r--r--lib/internal/timers.js1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/internal/timers.js b/lib/internal/timers.js
index aa061be3db..df2a88558f 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);