diff options
author | Tom <tomut@yahoo.com> | 2020-10-31 10:32:02 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-11-30 13:17:02 +0100 |
commit | e0e26c6c679cad38c809ff3d898d135e505c67ff (patch) | |
tree | 88821927a9c2cc2ae7a5038d42ee1e21a8bb26bc /Libraries/LibCore | |
parent | c1276559baea803b6bb93411544ab56750e7278a (diff) | |
download | serenity-e0e26c6c679cad38c809ff3d898d135e505c67ff.zip |
LibCore: Don't wait for negative amount of time
Diffstat (limited to 'Libraries/LibCore')
-rw-r--r-- | Libraries/LibCore/EventLoop.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibCore/EventLoop.cpp b/Libraries/LibCore/EventLoop.cpp index e5b3b7428f..646e8d3e8c 100644 --- a/Libraries/LibCore/EventLoop.cpp +++ b/Libraries/LibCore/EventLoop.cpp @@ -584,7 +584,7 @@ retry: now.tv_sec = now_spec.tv_sec; now.tv_usec = now_spec.tv_nsec / 1000; timeval_sub(next_timer_expiration.value(), now, timeout); - if (timeout.tv_sec < 0) { + if (timeout.tv_sec < 0 || (timeout.tv_sec == 0 && timeout.tv_usec < 0)) { timeout.tv_sec = 0; timeout.tv_usec = 0; } |