1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

fix race condition when starting web service

This commit is contained in:
Georg Reinke 2017-05-12 11:35:57 +02:00
parent 1067c66ab8
commit 959d8aa796

View file

@ -223,11 +223,11 @@ int web_start(struct web *w)
error("WebSocket: failed to initialize server");
}
w->state = STATE_STARTED;
ret = pthread_create(&w->thread, NULL, worker, w);
if (ret)
error("Failed to start Web worker");
w->state = STATE_STARTED;
return ret;
}