summaryrefslogtreecommitdiff
path: root/Libraries/LibCore/EventLoop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibCore/EventLoop.cpp')
-rw-r--r--Libraries/LibCore/EventLoop.cpp2
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;
}