timer started in handle's callback does not work properly #678

Closed
zenkj opened this Issue Jan 6, 2013 · 2 comments

Comments

Projects
None yet
3 participants
@zenkj

zenkj commented Jan 6, 2013

in uv_timer_start, the timeout value relies on loop->time. but in the callback of a handler(such as uv_tcp_t), the loop->time is not correct(in uv_run2, it's updated in uv_update_time, but the callback is called in uv__io_poll, after waiting for some timeout time). Is it proper to call uv_update_time in uv__io_poll?

@bnoordhuis bnoordhuis closed this in 2f55353 Jan 6, 2013

@bnoordhuis

This comment has been minimized.

Show comment Hide comment
@bnoordhuis

bnoordhuis Jan 6, 2013

Contributor

Thanks for the bug report and the clear analysis, it's fixed in 2f55353.

@piscisaureus Does it affect uv-win too? I looked at src/win/core.c but I couldn't tell.

Contributor

bnoordhuis commented Jan 6, 2013

Thanks for the bug report and the clear analysis, it's fixed in 2f55353.

@piscisaureus Does it affect uv-win too? I looked at src/win/core.c but I couldn't tell.

@piscisaureus

This comment has been minimized.

Show comment Hide comment
@piscisaureus

piscisaureus Jan 7, 2013

Member

@bnoordhuis No, uv-win updates the current time both before and after the poll function. (Although it only updates before if there are any timers.)

Member

piscisaureus commented Jan 7, 2013

@bnoordhuis No, uv-win updates the current time both before and after the poll function. (Although it only updates before if there are any timers.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment