From c611cbc2cafa6d5982292ae762006949e022a82d Mon Sep 17 00:00:00 2001 From: "roberto@natty32" Date: Wed, 23 Mar 2011 11:59:05 +0100 Subject: [PATCH] fixed current_wsgi_req in multithreading without cores --- uwsgi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uwsgi.c b/uwsgi.c index 2c7ee793..b7fc33a9 100644 --- a/uwsgi.c +++ b/uwsgi.c @@ -1701,7 +1701,8 @@ int uwsgi_start(void *v_argv) { #ifdef UWSGI_THREADING if (uwsgi.sockets_cnt) { if (uwsgi.has_threads) { - uwsgi.current_wsgi_req = threaded_current_wsgi_req; + if (uwsgi.threads > 1) + uwsgi.current_wsgi_req = threaded_current_wsgi_req; for (i = 0; i < 0xFF; i++) { if (uwsgi.p[i]->enable_threads) uwsgi.p[i]->enable_threads();