dns: Set the result to null in cancelLookup()

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);
```
This commit is contained in:
Andrej Mitrovic 2020-08-18 17:49:54 +09:00 committed by Mathias LANG
parent deaebb18d8
commit ac4aec341e

View file

@ -132,6 +132,7 @@ final class EventDriverDNS_GAI(Events : EventDriverEvents, Signals : EventDriver
{ {
if (!isValid(handle)) return; if (!isValid(handle)) return;
m_lookups[handle].callback = null; m_lookups[handle].callback = null;
m_lookups[handle].result = null;
m_events.loop.m_waiterCount--; m_events.loop.m_waiterCount--;
} }