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:
parent
deaebb18d8
commit
ac4aec341e
|
@ -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--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue