Skip to content

Commit

Permalink
run the timers after the polling
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Aug 31, 2022
1 parent 69e6cf4 commit 423c619
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion deps/uv/src/unix/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,6 @@ int uv_run(uv_loop_t* loop, uv_run_mode mode) {

while (r != 0 && loop->stop_flag == 0) {
uv__update_time(loop);
uv__run_timers(loop);
ran_pending = uv__run_pending(loop);
uv__run_idle(loop);
uv__run_prepare(loop);
Expand All @@ -395,6 +394,8 @@ int uv_run(uv_loop_t* loop, uv_run_mode mode) {
*/
uv__metrics_update_idle_time(loop);

uv__run_timers(loop);

uv__run_check(loop);
uv__run_closing_handles(loop);

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-http-client-response-timeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ server.listen(common.mustCall(() => {
http.get({ port: server.address().port }, common.mustCall((res) => {
res.on('timeout', common.mustCall(() => req.destroy()));
res.setTimeout(1);
server.close();
setTimeout(() => server.close(), 2);
}));
}));

0 comments on commit 423c619

Please sign in to comment.