This commit fixes an unresolved webserver issue. When closing webserver,
http_server_stop() repeats pthread_kill() every 100ms regardless of
webserver's thread status. Because this repeatation has possibilities
to make improper thread and webserver status, clean up it.
Change-Id: I84fc088dc3c36f0ae0da5b2fe9443ca5a71c7db1
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
for (i = 0; i < HTTP_CONF_MAX_CLIENT_HANDLE; i++) {
pthread_kill(server->c_tid[i], HTTP_CONF_SERVER_SIGWAKEUP);
- usleep(10000);
}
mq_close(msg_q);
server->state = HTTP_SERVER_STOP_REQ;
while (server->state != HTTP_SERVER_STOP) {
- pthread_kill(server->tid, HTTP_CONF_SERVER_SIGWAKEUP);
usleep(100000);
}