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 | cc13dc44324dd5970d7a239e243a38d5f22cf64f (patch) | |
tree | e7429020c9c6aec4b93a84dd63b810f67dacce9c /support/unix | |
parent | Adding debian version 1.7.2-3.2. (diff) | |
download | apr-cc13dc44324dd5970d7a239e243a38d5f22cf64f.tar.xz apr-cc13dc44324dd5970d7a239e243a38d5f22cf64f.zip |
Merging upstream version 1.7.5.
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); |