diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-12 04:59:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-12 04:59:58 +0000 |
commit | b8d375bcb1f462d5af5d1f480b32d7b0038417f6 (patch) | |
tree | 93d48ade79cc9d5892f17ff41c33753be6bb0879 /support/unix | |
parent | Adding upstream version 1.7.2. (diff) | |
download | apr-upstream.tar.xz apr-upstream.zip |
Adding upstream version 1.7.5.upstream/1.7.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'support/unix')
-rw-r--r-- | support/unix/waitio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/support/unix/waitio.c b/support/unix/waitio.c index fa5edb6..a3c6a83 100644 --- a/support/unix/waitio.c +++ b/support/unix/waitio.c @@ -42,10 +42,13 @@ apr_status_t apr_wait_for_io_or_timeout(apr_file_t *f, apr_socket_t *s, struct pollfd pfd; int rc, timeout; - timeout = f ? f->timeout / 1000 : s->timeout / 1000; + timeout = f ? f->timeout : s->timeout; pfd.fd = f ? f->filedes : s->socketdes; pfd.events = for_read ? POLLIN : POLLOUT; + if (timeout > 0) { + timeout = (timeout + 999) / 1000; + } do { rc = poll(&pfd, 1, timeout); } while (rc == -1 && errno == EINTR); |