From 9bc71352d2b33d107a13e64bc972d6f2143e18a4 Mon Sep 17 00:00:00 2001 From: Huiba Li Date: Mon, 29 Apr 2024 10:35:53 +0800 Subject: [PATCH] PR 0.7 to main (#468) * httpfs add error log (#436) * Remove some outdated libcurl option usage in curl wrapper header (#440) (#443) * zlib and uring source build didn't have -O3 (#451) * fix dns discard (#459) Signed-off-by: liulanzheng * http client support uds (#461) * epoll_wait allows to wait 0ms, instead of the previous 1ms (#466) --------- Signed-off-by: liulanzheng Co-authored-by: Bob Chen Co-authored-by: Coldwings Co-authored-by: Lanzheng Liu --- io/epoll.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/io/epoll.cpp b/io/epoll.cpp index a45ec09f..487aaf63 100644 --- a/io/epoll.cpp +++ b/io/epoll.cpp @@ -203,11 +203,8 @@ ok: entry.interests |= eint; int do_epoll_wait(uint64_t timeout) { assert(_events_remain == 0); uint8_t cool_down_ms = 1; - // since timeout may less than 1ms - // in such condition, timeout_ms should be at least 1 - // or it may call epoll_wait without any idle - timeout = (timeout && timeout < 1024) ? 1 : timeout / 1024; - timeout &= 0x7fffffff; // make sure less than INT32_MAX + // epoll_wait 0ms should be OK, make sure less than INT32_MAX + timeout = (timeout / 1000) & 0x7fffffff; while (_engine_fd > 0) { int ret = ::epoll_wait(_engine_fd, _events, LEN(_events), timeout); if (ret < 0) {