mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
yhttpd: try to fix shutdown problems, probably directfb related
This commit is contained in:
@@ -107,6 +107,7 @@ void yhttpd_reload_config() {
|
|||||||
#ifndef Y_CONFIG_BUILD_AS_DAEMON
|
#ifndef Y_CONFIG_BUILD_AS_DAEMON
|
||||||
void * nhttpd_main_thread(void *) {
|
void * nhttpd_main_thread(void *) {
|
||||||
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, 0);
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, 0);
|
||||||
|
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
||||||
aprintf("Webserver %s tid %ld\n", WEBSERVERNAME, syscall(__NR_gettid));
|
aprintf("Webserver %s tid %ld\n", WEBSERVERNAME, syscall(__NR_gettid));
|
||||||
yhttpd = new Cyhttpd();
|
yhttpd = new Cyhttpd();
|
||||||
//CLogging::getInstance()->setDebug(true);
|
//CLogging::getInstance()->setDebug(true);
|
||||||
|
@@ -218,6 +218,8 @@ bool CWebserver::run(void) {
|
|||||||
CySocket *newConnectionSock;
|
CySocket *newConnectionSock;
|
||||||
if (!(newConnectionSock = listenSocket.accept())) //Now: Blocking wait
|
if (!(newConnectionSock = listenSocket.accept())) //Now: Blocking wait
|
||||||
{
|
{
|
||||||
|
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
||||||
|
pthread_testcancel();
|
||||||
dperror("Socket accept error. Continue.\n");
|
dperror("Socket accept error. Continue.\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user