From b8d375bcb1f462d5af5d1f480b32d7b0038417f6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 12 Sep 2024 06:59:58 +0200 Subject: Adding upstream version 1.7.5. Signed-off-by: Daniel Baumann --- support/unix/waitio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'support') 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); -- cgit v1.2.3