diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/httpserver.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 9f079aedfe..0a7f903e9f 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -457,6 +457,13 @@ void InterruptHTTPServer() // Reject requests on current connections evhttp_set_gencb(eventHTTP, http_reject_request_cb, NULL); } + if (eventBase) { + // Force-exit event loop after predefined time + struct timeval tv; + tv.tv_sec = 10; + tv.tv_usec = 0; + event_base_loopexit(eventBase, &tv); + } if (workQueue) workQueue->Interrupt(); } |