Skip to content

Commit

Permalink
lib: ioloop-kqueue - Improve kevent() panic log message
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen authored and GitLab committed Jun 10, 2017
1 parent 4ecee12 commit 2e68d07
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/lib/ioloop-kqueue.c
Expand Up @@ -129,8 +129,11 @@ void io_loop_handler_run_internal(struct ioloop *ioloop)

if (events_count > 0) {
ret = kevent (ctx->kq, NULL, 0, events, events_count, &ts);
if (ret < 0 && errno != EINTR)
i_panic("kevent() failed: %m");
if (ret < 0 && errno != EINTR) {
i_panic("kevent(events=%u, ts=%ld.%u) failed: %m",
events_count, (long)ts.tv_sec,
(unsigned int)ts.tv_nsec);
}
} else {
if (msecs < 0)
i_panic("BUG: No IOs or timeouts set. Not waiting for infinity.");
Expand Down

0 comments on commit 2e68d07

Please sign in to comment.