diff options
author | João Barbosa <joao.paulo.barbosa@gmail.com> | 2019-07-17 15:27:44 +0100 |
---|---|---|
committer | João Barbosa <joao.paulo.barbosa@gmail.com> | 2019-07-17 15:32:38 +0100 |
commit | a981e749e6553487cd48eda28e590f769e81c85c (patch) | |
tree | d08c59d88e1f8bb9088d9745cc174fe4199dc086 | |
parent | 459baa1756b7f2d10d261daa0d0f5f4b91cef21f (diff) | |
download | bitcoin-a981e749e6553487cd48eda28e590f769e81c85c.tar.xz |
fix: tor: Call event_base_loopbreak from the event's callback
-rw-r--r-- | src/torcontrol.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/torcontrol.cpp b/src/torcontrol.cpp index a1c730ba08..3f40785c21 100644 --- a/src/torcontrol.cpp +++ b/src/torcontrol.cpp @@ -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); } } |