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:
parent
71c0d0370a
commit
d7894f3969
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user