completed --reload-on-exception* options

This commit is contained in:
roberto@precise64
2012-03-21 20:37:03 +01:00
parent 1a20f57b73
commit f3fdec2739
2 changed files with 6 additions and 0 deletions
+4
View File
@@ -222,12 +222,16 @@ int uwsgi_response_subhandler_wsgi(struct wsgi_request *wsgi_req) {
if (!pychunk) {
if (PyErr_Occurred()) {
int do_exit = uwsgi_python_manage_exceptions();
if (PyErr_ExceptionMatches(PyExc_MemoryError)) {
uwsgi_log("Memory Error detected !!!\n");
}
uwsgi.workers[uwsgi.mywid].exceptions++;
uwsgi_apps[wsgi_req->app_id].exceptions++;
PyErr_Print();
if (do_exit) {
exit(UWSGI_EXCEPTION_CODE);
}
}
if (PyObject_HasAttrString((PyObject *)wsgi_req->async_result, "close")) {
PyObject *close_method = PyObject_GetAttrString((PyObject *)wsgi_req->async_result, "close");