fix: tor: Call event_base_loopbreak from the event's callback

This commit is contained in:
João Barbosa 2019-07-17 15:27:44 +01:00
parent 459baa1756
commit a981e749e6

View file

@ -759,7 +759,9 @@ void InterruptTorControl()
{
if (gBase) {
LogPrintf("tor: Thread interrupt\n");
event_base_loopbreak(gBase);
event_base_once(gBase, -1, EV_TIMEOUT, [](evutil_socket_t, short, void*) {
event_base_loopbreak(gBase);
}, nullptr, nullptr);
}
}