Skip to content

Commit

Permalink
dns: Set the result to null in cancelLookup()
Browse files Browse the repository at this point in the history
When lookupHost() is called the handle returned
from allocateHandle() might be a reused handle.

The delegate will be cleared, but the result might
still be there and the assert in lookupHost()
will fail:

```
assert(!m_lookups[handle].result);
```
  • Loading branch information
AndrejMitrovic authored and Geod24 committed Aug 19, 2020
1 parent deaebb1 commit ac4aec3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions source/eventcore/drivers/posix/dns.d
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ final class EventDriverDNS_GAI(Events : EventDriverEvents, Signals : EventDriver
{
if (!isValid(handle)) return;
m_lookups[handle].callback = null;
m_lookups[handle].result = null;
m_events.loop.m_waiterCount--;
}

Expand Down

0 comments on commit ac4aec3

Please sign in to comment.