Skip to content

Commit

Permalink
PR 0.7 to main (#468)
Browse files Browse the repository at this point in the history
* 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 <lanzheng.liulz@alibaba-inc.com>

* http client support uds (#461)

* epoll_wait allows to wait 0ms, instead of the previous 1ms (#466)

---------

Signed-off-by: liulanzheng <lanzheng.liulz@alibaba-inc.com>
Co-authored-by: Bob Chen <beef9999@qq.com>
Co-authored-by: Coldwings <coldwings@me.com>
Co-authored-by: Lanzheng Liu <lanzheng.liulz@alibaba-inc.com>
  • Loading branch information
4 people committed Apr 29, 2024
1 parent 265c65a commit 9bc7135
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions io/epoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9bc7135

Please sign in to comment.