diff --git a/hello_world.py b/hello_world.py index a1c5b18d..a5119194 100644 --- a/hello_world.py +++ b/hello_world.py @@ -1,10 +1,15 @@ import uwsgi +if uwsgi.loop == 'gevent': + import gevent + print uwsgi.version print uwsgi.workers() uwsgi.cache_set('foo', "Hello World from cache") def application(env, start_response): start_response('200 OK', [('Content-Type', 'text/html')]) yield "foobar
" + if uwsgi.loop == 'gevent': + gevent.sleep(10) yield str(env['wsgi.input'].fileno()) yield "

Hello World

" yield uwsgi.cache_get('foo') diff --git a/plugins/gevent/gevent.c b/plugins/gevent/gevent.c index 08e26f35..6c58b513 100644 --- a/plugins/gevent/gevent.c +++ b/plugins/gevent/gevent.c @@ -107,7 +107,6 @@ PyObject *py_uwsgi_gevent_main(PyObject * self, PyObject * args) { // accept the connection if (wsgi_req_simple_accept(wsgi_req, uwsgi.sockets->fd)) { - uwsgi_close_request(wsgi_req); free_req_queue; goto clear; }