Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timers: fix refresh inside callback #26721

Closed

Conversation

Projects
None yet
9 participants
@apapirovski
Copy link
Member

commented Mar 17, 2019

When timers.refresh() is called inside a callback, the timer would incorrectly end up unrefed and thus not keep the event loop alive.

Fixes: #26642

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
@apapirovski

This comment has been minimized.

Copy link
Member Author

commented Mar 17, 2019

@starkwang starkwang referenced this pull request Mar 18, 2019

Closed

timers: fix refreshed timers exiting too early #26672

3 of 3 tasks complete

apapirovski added some commits Mar 17, 2019

timers: fix refresh inside callback
When `timers.refresh()` is called inside a callback, the timer would
incorrectly end up unrefed and thus not keep the event loop alive.

@apapirovski apapirovski force-pushed the apapirovski:fix-timers-refresh-in-callback branch from 239c9ae to a70719a Mar 19, 2019

@apapirovski

This comment has been minimized.

Copy link
Member Author

commented Mar 19, 2019

@antsmartian

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2019

@danbev

This comment has been minimized.

Copy link
Member

commented Mar 20, 2019

Landed in 4306300.

@danbev danbev closed this Mar 20, 2019

danbev added a commit that referenced this pull request Mar 20, 2019

timers: fix refresh inside callback
When `timers.refresh()` is called inside a callback, the timer would
incorrectly end up unrefed and thus not keep the event loop alive.

PR-URL: #26721
Fixes: #26642
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>

targos added a commit that referenced this pull request Mar 27, 2019

timers: fix refresh inside callback
When `timers.refresh()` is called inside a callback, the timer would
incorrectly end up unrefed and thus not keep the event loop alive.

PR-URL: #26721
Fixes: #26642
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>

@targos targos referenced this pull request Mar 27, 2019

Merged

v11.13.0 release proposal #26949

zero1five added a commit to zero1five/node that referenced this pull request Jun 12, 2019

timers: fix refresh too early to exit
Add an or option for put refresh back to work. nodejs#26721 one reason it
can't be overridden it only works in the callback of the current
timer(before `finally`).

Fixes: nodejs#28168

zero1five added a commit to zero1five/node that referenced this pull request Jun 12, 2019

timers: fix refresh too early to exit
Add an or option for put refresh back to work. nodejs#26721 one reason it
can't be overridden it only works in the callback of the current
timer(before `finally`).

Fixes: nodejs#28168

zero1five added a commit to zero1five/node that referenced this pull request Jun 13, 2019

timers: fix refresh too early to exit
Add an or option for put refresh back to work. nodejs#26721 one reason it
can't be overridden it only works in the callback of the current
timer(before `finally`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.