aboutsummaryrefslogtreecommitdiff
path: root/src/httpserver.cpp
diff options
context:
space:
mode:
authorJoão Barbosa <[email protected]>2018-11-07 09:11:16 +0000
committerJoão Barbosa <[email protected]>2018-11-23 16:54:22 +0000
commite98a9eede2fb48ff33a020acc888cbcd83e24bbf (patch)
tree54a36b55f9ed1cec4defb689ef0bf44691e93788 /src/httpserver.cpp
parenthttp: Unlisten sockets after all workers quit (diff)
downloaddiscoin-e98a9eede2fb48ff33a020acc888cbcd83e24bbf.tar.xz
discoin-e98a9eede2fb48ff33a020acc888cbcd83e24bbf.zip
http: Remove unnecessary event_base_loopexit call
Let event base loop exit cleanly by processing all active and pending events. The call is no longer necessary because closing persistent connections is now properly handled.
Diffstat (limited to 'src/httpserver.cpp')
-rw-r--r--src/httpserver.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/httpserver.cpp b/src/httpserver.cpp
index 0ab9d966d..2cc83eecd 100644
--- a/src/httpserver.cpp
+++ b/src/httpserver.cpp
@@ -470,8 +470,6 @@ void StopHTTPServer()
boundSockets.clear();
if (eventBase) {
LogPrint(BCLog::HTTP, "Waiting for HTTP event thread to exit\n");
- // Exit the event loop as soon as there are no active events.
- event_base_loopexit(eventBase, nullptr);
// Give event loop a few seconds to exit (to send back last RPC responses), then break it
// Before this was solved with event_base_loopexit, but that didn't work as expected in
// at least libevent 2.0.21 and always introduced a delay. In libevent