]> 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)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 22 Aug 2018 10:46:30 +0000 (13:46 +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 5aac59a37ae53ee49a07fe68b29a1133b245f80f..9d1868e87ce1b5063cd173fc8c8622b9c5c919c8 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 3050c61af686d9319459939e3b774e4432814f10..6b4db3f70918c62605c0c57c4e77b6b9e348826b 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;
        }