Skip to content

Commit 24ae6ec

Browse files
author
Sebastiano Merlino
committed
Avoid thread death after start
Almost all threads were diying after the webserver start. This was due to the mispositioning of a boolean that has now been moved up.
1 parent c4b17ab commit 24ae6ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/webserver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,7 @@ bool webserver::start(bool blocking)
532532
if(max_threads > num_threads)
533533
num_threads = max_threads;
534534

535+
this->running = true;
535536
if(start_method == http_utils::INTERNAL_SELECT)
536537
{
537538
for(int i = 0; i < num_threads; i++)
@@ -583,7 +584,6 @@ bool webserver::start(bool blocking)
583584
details::daemon_item* di = new details::daemon_item(this, daemon);
584585
daemons.push_back(di);
585586
}
586-
this->running = true;
587587
bool value_onclose = false;
588588
if(blocking)
589589
{

0 commit comments

Comments
 (0)