Skip to content

Commit

Permalink
Replace assertion failure with warning.
Browse files Browse the repository at this point in the history
Since this only happens at process exit, while the driver is being disposed, this avoids a hard crash for an issue that has no consequences for the application. More research still needs to be put into this to find the actual root cause.
  • Loading branch information
s-ludwig committed Mar 15, 2024
1 parent 3ced683 commit 7aafe71
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 7aafe71

Please sign in to comment.