Handle fake events when they are delivered

Since fake events are delivered via the event loop they can and
indeed should be processed immediately.
This commit is contained in:
Johan Wikman 2017-04-19 16:06:20 +03:00
parent db3153ee4e
commit a8b42d24b7

View File

@ -2254,6 +2254,12 @@ static void dcb_hangup_foreach_worker(int thread_id, struct server* server)
dcb->server == server)
{
poll_fake_hangup_event(dcb);
// dcb_hangup_foreach_worker() is called via the message loop,
// so immediately after the hangup event has been added, we can
// also process it. Indeed, it is necessary to do that because
// otherwise, unless there is a real event for the DCB descriptor,
// the fake event would not be handled.
dcb_process_fake_events(dcb, thread_id);
}
}
}