]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: ioloop-epoll/kqueue: Remove now unnecessary infinite wait check.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 17 Aug 2018 08:33:17 +0000 (11:33 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Wed, 12 Sep 2018 06:11:03 +0000 (09:11 +0300)
The previous change adds this globally to io_loop_run_get_wait_time().

src/lib/ioloop-epoll.c
src/lib/ioloop-kqueue.c

index 425ce217ae022d0917a7c7dc2ce28319d772d13c..0fef61e04ba80a54731128186e3ab8a6f1167c69 100644 (file)
@@ -185,8 +185,7 @@ void io_loop_handler_run_internal(struct ioloop *ioloop)
        } else {
                /* no I/Os, but we should have some timeouts.
                   just wait for them. */
-               if (msecs < 0)
-                       i_panic("BUG: No IOs or timeouts set. Not waiting for infinity.");
+               i_assert(msecs >= 0);
                usleep(msecs*1000);
                ret = 0;
        }
index 8ba57e6d9bb231eae8fbfe9ac3ee1b5c69046515..014731d99899b301ea86d5bf98fcf6ae85fc1f5f 100644 (file)
@@ -134,8 +134,7 @@ void io_loop_handler_run_internal(struct ioloop *ioloop)
                                (unsigned int)ts.tv_nsec);
                }
        } else {
-               if (msecs < 0)
-                       i_panic("BUG: No IOs or timeouts set. Not waiting for infinity.");
+               i_assert(msecs >= 0);
                usleep(msecs * 1000);
                ret = 0;
        }