mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-06-16 02:15:48 +00:00
remove monitored fd from async queue when in async mode
This commit is contained in:
@@ -389,6 +389,7 @@ void async_loop() {
|
||||
while (uwsgi.wsgi_req->waiting_fds) {
|
||||
tmp_uaf = uwsgi.wsgi_req->waiting_fds;
|
||||
uwsgi.async_waiting_fd_table[tmp_uaf->fd] = NULL;
|
||||
event_queue_del_fd(uwsgi.async_queue, tmp_uaf->fd, tmp_uaf->event);
|
||||
uwsgi.wsgi_req->waiting_fds = tmp_uaf->next;
|
||||
free(tmp_uaf);
|
||||
}
|
||||
@@ -425,6 +426,7 @@ void async_loop() {
|
||||
while (uwsgi.wsgi_req->waiting_fds) {
|
||||
tmp_uaf = uwsgi.wsgi_req->waiting_fds;
|
||||
uwsgi.async_waiting_fd_table[tmp_uaf->fd] = NULL;
|
||||
event_queue_del_fd(uwsgi.async_queue, tmp_uaf->fd, tmp_uaf->event);
|
||||
uwsgi.wsgi_req->waiting_fds = tmp_uaf->next;
|
||||
free(tmp_uaf);
|
||||
}
|
||||
|
||||
@@ -1040,6 +1040,7 @@ next:
|
||||
}
|
||||
sse = sse->next;
|
||||
}
|
||||
|
||||
// check if a file named uwsgi.check_static+env['PATH_INFO'] exists
|
||||
udd = uwsgi.check_static;
|
||||
while(udd) {
|
||||
|
||||
+1
-1
@@ -1491,7 +1491,7 @@ int uwsgi_get_app_id(char *app_name, int app_name_len, int modifier1) {
|
||||
}
|
||||
|
||||
if (found) {
|
||||
if (uwsgi_apps[i].touch_reload) {
|
||||
if (uwsgi_apps[i].touch_reload[0]) {
|
||||
if (!stat(uwsgi_apps[i].touch_reload, &st)) {
|
||||
if (st.st_mtime != uwsgi_apps[i].touch_reload_mtime) {
|
||||
// serve the new request and reload
|
||||
|
||||
@@ -416,7 +416,6 @@ int uwsgi_request_wsgi(struct wsgi_request *wsgi_req) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ( (wsgi_req->app_id = uwsgi_get_app_id(wsgi_req->appid, wsgi_req->appid_len, 0)) == -1) {
|
||||
wsgi_req->app_id = uwsgi.default_app;
|
||||
if (uwsgi.no_default_app) {
|
||||
@@ -454,6 +453,7 @@ int uwsgi_request_wsgi(struct wsgi_request *wsgi_req) {
|
||||
wi = &uwsgi_apps[wsgi_req->app_id];
|
||||
|
||||
up.swap_ts(wsgi_req, wi);
|
||||
|
||||
|
||||
if (wi->chdir[0] != 0) {
|
||||
#ifdef UWSGI_DEBUG
|
||||
@@ -473,8 +473,10 @@ int uwsgi_request_wsgi(struct wsgi_request *wsgi_req) {
|
||||
// create WSGI environ
|
||||
wsgi_req->async_environ = up.wsgi_env_create(wsgi_req, wi);
|
||||
|
||||
|
||||
wsgi_req->async_result = wi->request_subhandler(wsgi_req, wi);
|
||||
|
||||
|
||||
if (wsgi_req->async_result) {
|
||||
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ extern PyTypeObject uwsgi_InputType;
|
||||
|
||||
void *uwsgi_request_subhandler_wsgi(struct wsgi_request *wsgi_req, struct uwsgi_app *wi) {
|
||||
|
||||
|
||||
PyObject *zero;
|
||||
int i;
|
||||
PyObject *pydictkey, *pydictvalue;
|
||||
|
||||
Reference in New Issue
Block a user