diff options
Diffstat (limited to 'poll/unix/z_asio.c')
-rw-r--r-- | poll/unix/z_asio.c | 3 |
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 " |