do not inizialize request plugins if not needed

This commit is contained in:
roberto@precise64
2012-02-15 21:28:12 +01:00
parent 8111acaad1
commit 310acaf4cc
+12 -6
View File
@@ -2248,9 +2248,12 @@ skipzero:
}
}
for (i = 0; i < 0xff; i++) {
if (uwsgi.p[i]->post_init) {
uwsgi.p[i]->post_init();
// again check for workers/sockets...
if (uwsgi.sockets || uwsgi.master_process || uwsgi.no_server || uwsgi.command_mode) {
for (i = 0; i < 0xff; i++) {
if (uwsgi.p[i]->post_init) {
uwsgi.p[i]->post_init();
}
}
}
@@ -2273,9 +2276,12 @@ skipzero:
pthread_mutex_init(&uwsgi.lock_static, NULL);
for (i = 0; i < 0xFF; i++) {
if (uwsgi.p[i]->enable_threads)
uwsgi.p[i]->enable_threads();
// again check for workers/sockets...
if (uwsgi.sockets || uwsgi.master_process || uwsgi.no_server || uwsgi.command_mode) {
for (i = 0; i < 0xFF; i++) {
if (uwsgi.p[i]->enable_threads)
uwsgi.p[i]->enable_threads();
}
}
}
#endif