unbit/uwsgi — pull request #200 by jbert (2013-03-28 17:33:43+00:00)
Title: Fix segfault in psgi plugin

Under test load we've seen segfaults in psgi plugin. gdb and logging shows we're in uwsgi_perl_after_request called from XS_coroae_accept_request from an early error path (the wsgi_req->socket->proto returning status < 0).

Given that it seems legitimate that we might have an incomplete wsgi_req (with no async_environ), a NULL check during cleanup seems appropriate. Hope that's a reasonable response to the problem.