Skip to content

Commit c8d270e

Browse files
author
Sebastiano Merlino
committed
marking ws as started only after mhd is started
1 parent ebc5acf commit c8d270e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/webserver.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,6 @@ bool webserver::start(bool blocking)
359359
start_conf |= MHD_USE_TCP_FASTOPEN;
360360
#endif
361361

362-
this->running = true;
363-
364362
struct MHD_Daemon* daemon = MHD_start_daemon
365363
(
366364
start_conf, this->port, &policy_callback, this,
@@ -377,6 +375,9 @@ bool webserver::start(bool blocking)
377375
daemons.push_back(di);
378376

379377
bool value_onclose = false;
378+
379+
this->running = true;
380+
380381
if(blocking)
381382
{
382383
pthread_mutex_lock(&mutexwait);

0 commit comments

Comments
 (0)