diff --git a/meson.build b/meson.build index 5ff9505..4a6b195 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('eventcore', 'd', meson_version: '>=0.50', - version: '0.9.6' + version: '0.9.7' ) project_soversion = '0' diff --git a/source/eventcore/drivers/posix/dns.d b/source/eventcore/drivers/posix/dns.d index c549648..6875a0a 100644 --- a/source/eventcore/drivers/posix/dns.d +++ b/source/eventcore/drivers/posix/dns.d @@ -180,7 +180,14 @@ final class EventDriverDNS_GAI(Events : EventDriverEvents, Signals : EventDriver l.done = false; if (i == m_maxHandle) m_maxHandle = lastmax; m_events.loop.m_waiterCount--; - passToDNSCallback(DNSLookupID(i, l.validationCounter), cb, status, ai); + // An error happened, we have a return code + // We can directly call the delegate with it instead + // of calling `passToDNSCallback` (which doesn't support + // a `null` result on some platforms) + if (ai is null) + cb(DNSLookupID(i, l.validationCounter), status, null); + else + passToDNSCallback(DNSLookupID(i, l.validationCounter), cb, status, ai); } else lastmax = i; } }