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>
This commit is contained in:
Anatoli Papirovski 2018-01-31 11:08:25 -05:00
parent 71c0d0370a
commit d7894f3969
No known key found for this signature in database
GPG Key ID: 614E2E1ABEB4B2C0

View File

@ -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);