f0d6ab
f0d6ab
https://github.com/GrahamDumpleton/mod_wsgi/commit/f8b43b2b79fabdcead4410f1a10484a10608ba6a
f0d6ab
f0d6ab
--- mod_wsgi-3.4/mod_wsgi.c.deadlock
f0d6ab
+++ mod_wsgi-3.4/mod_wsgi.c
f0d6ab
@@ -11113,8 +11113,10 @@
f0d6ab
     while (1) {
f0d6ab
         apr_sleep(apr_time_from_sec(1));
f0d6ab
 
f0d6ab
-        gilstate = PyGILState_Ensure();
f0d6ab
-        PyGILState_Release(gilstate);
f0d6ab
+        if (!wsgi_daemon_shutdown) {
f0d6ab
+            gilstate = PyGILState_Ensure();
f0d6ab
+            PyGILState_Release(gilstate);
f0d6ab
+        }
f0d6ab
 
f0d6ab
         apr_thread_mutex_lock(wsgi_shutdown_lock);
f0d6ab
         wsgi_deadlock_shutdown_time = apr_time_now();