mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge bd5ec7c528 into merged_master (Bitcoin PR #19006)
This commit is contained in:
commit
e1d89a5742
3 changed files with 21 additions and 21 deletions
|
|
@ -422,7 +422,7 @@ bool UpdateHTTPServerLogging(bool enable) {
|
|||
#endif
|
||||
}
|
||||
|
||||
static std::thread threadHTTP;
|
||||
static std::thread g_thread_http;
|
||||
static std::vector<std::thread> g_thread_http_workers;
|
||||
|
||||
void StartHTTPServer()
|
||||
|
|
@ -430,7 +430,7 @@ void StartHTTPServer()
|
|||
LogPrint(BCLog::HTTP, "Starting HTTP server\n");
|
||||
int rpcThreads = std::max((long)gArgs.GetArg("-rpcthreads", DEFAULT_HTTP_THREADS), 1L);
|
||||
LogPrintf("HTTP: starting %d worker threads\n", rpcThreads);
|
||||
threadHTTP = std::thread(ThreadHTTP, eventBase);
|
||||
g_thread_http = std::thread(ThreadHTTP, eventBase);
|
||||
|
||||
for (int i = 0; i < rpcThreads; i++) {
|
||||
g_thread_http_workers.emplace_back(HTTPWorkQueueRun, workQueue, i);
|
||||
|
|
@ -468,7 +468,7 @@ void StopHTTPServer()
|
|||
boundSockets.clear();
|
||||
if (eventBase) {
|
||||
LogPrint(BCLog::HTTP, "Waiting for HTTP event thread to exit\n");
|
||||
threadHTTP.join();
|
||||
if (g_thread_http.joinable()) g_thread_http.join();
|
||||
}
|
||||
if (eventHTTP) {
|
||||
evhttp_free(eventHTTP);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue