summaryrefslogtreecommitdiffstats
path: root/poll/unix/z_asio.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-12 04:59:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-12 04:59:58 +0000
commitb8d375bcb1f462d5af5d1f480b32d7b0038417f6 (patch)
tree93d48ade79cc9d5892f17ff41c33753be6bb0879 /poll/unix/z_asio.c
parentAdding upstream version 1.7.2. (diff)
downloadapr-upstream/1.7.5.tar.xz
apr-upstream/1.7.5.zip
Adding upstream version 1.7.5.upstream/1.7.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'poll/unix/z_asio.c')
-rw-r--r--poll/unix/z_asio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/poll/unix/z_asio.c b/poll/unix/z_asio.c
index 48b531c..e7d9d9d 100644
--- a/poll/unix/z_asio.c
+++ b/poll/unix/z_asio.c
@@ -554,7 +554,7 @@ static posix_poll(apr_pollset_t *pollset,
DBG(4, "entered\n");
if (timeout > 0) {
- timeout /= 1000;
+ timeout = (timeout + 999) / 1000;
}
rv = poll(priv->pollset, pollset->nelts, timeout);
(*num) = rv;
@@ -698,6 +698,7 @@ static apr_status_t asio_pollset_poll(apr_pollset_t *pollset,
tv.tv_nsec = apr_time_usec(timeout) * 1000;
} else {
tv.tv_sec = INT_MAX; /* block until something is ready */
+ tv.tv_nsec = 0;
}
DBG2(6, "nothing on the ready ring "