Skip to content

Commit

Permalink
http: Remove unnecessary event_base_loopexit call
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
promag committed Nov 23, 2018
1 parent 6b13580 commit e98a9ee
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/httpserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e98a9ee

Please sign in to comment.