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

bug in timeout calculation #12

Open
skypexu opened this issue Sep 30, 2015 · 0 comments
Open

bug in timeout calculation #12

skypexu opened this issue Sep 30, 2015 · 0 comments

Comments

@skypexu
Copy link

skypexu commented Sep 30, 2015

diff --git a/include/watchers/timeout.h b/include/watchers/timeout.h
index 98b0576..a275cf9 100644
--- a/include/watchers/timeout.h
+++ b/include/watchers/timeout.h
@@ -182,7 +182,7 @@ public:
         // in that case we won't reset the timer to not interfere with the event loop,
         // but only update the expire time, when the timer then expires, the callback
         // will not be called, but a new timer is going to be set instead
-        if (_active && _loop->now() + timeout < _expire)
+        if (_active && _loop->now() + timeout >= _expire)
         {
             // set the new expire time
             _expire = _loop->now() + timeout;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant