Skip to content

Commit

Permalink
Merge pull request #236 from vibe-d/avoid_kqueue_crash_at_exit
Browse files Browse the repository at this point in the history
Replace assertion failure with warning
  • Loading branch information
l-kramer authored Mar 15, 2024
2 parents 3ced683 + 7aafe71 commit 7dff30a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions source/eventcore/drivers/posix/kqueue.d
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,8 @@ abstract class KqueueEventLoopBase : PosixEventLoop {
auto ret = (() @trusted => kevent(m_queue, &m_changes[0], cast(int)m_changes.length, null, 0, null)) ();
debug {
import core.stdc.errno : errno;
import std.format : format;
try assert(ret == 0, format("Failed to place kqueue change: %s %s", ret, errno));
catch (Exception e) assert(false, "kqueue call for flushing changes failed");
if (ret != 0)
printWarningWithStackTrace("Failed to place kqueue changes: %s %s", ret, errno);
}
m_changeCount = 0;
}
Expand Down

0 comments on commit 7dff30a

Please sign in to comment.