diff --git a/src/common.c b/src/common.c index 96cb5d8..81c369d 100644 --- a/src/common.c +++ b/src/common.c @@ -61,7 +61,7 @@ struct extparam conf = { #ifdef __FreeBSD__ 16384, #else - 0 + 0, #endif 0, -1, 0, 0, 0, 0, 0, 500, 0, 0, 0, 6, 600, diff --git a/src/proxymain.c b/src/proxymain.c index d310958..442edd9 100644 --- a/src/proxymain.c +++ b/src/proxymain.c @@ -401,9 +401,6 @@ int MODULEMAINFUNC (int argc, char** argv){ return((*srv.pf)((void *)newparam)? 1:0); } - pthread_attr_init(&pa); - pthread_attr_setstacksize(&pa,PTHREAD_STACK_MIN + (8192 + srv.stacksize)); - pthread_attr_setdetachstate(&pa,PTHREAD_CREATE_DETACHED); #endif @@ -509,6 +506,11 @@ int MODULEMAINFUNC (int argc, char** argv){ srv.fds.fd = sock; srv.fds.events = POLLIN; +#ifndef _WIN32 + pthread_attr_init(&pa); + pthread_attr_setstacksize(&pa,PTHREAD_STACK_MIN + (8192 + srv.stacksize)); + pthread_attr_setdetachstate(&pa,PTHREAD_CREATE_DETACHED); +#endif for (;;) { for(;;){