Skip to content

Instantly share code, notes, and snippets.

@w0rse
Created September 30, 2014 08:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save w0rse/b45cacf53a9aad71f985 to your computer and use it in GitHub Desktop.
Save w0rse/b45cacf53a9aad71f985 to your computer and use it in GitHub Desktop.
Patch to fix worker timouts
diff --git a/gunicorn/workers/async.py b/gunicorn/workers/async.py
index 4cfa7a8..00bedc7 100644
--- a/gunicorn/workers/async.py
+++ b/gunicorn/workers/async.py
@@ -30,6 +30,7 @@ class AsyncWorker(base.Worker):
def handle(self, listener, client, addr):
req = None
try:
+ client.settimeout(self.cfg.timeout)
parser = http.RequestParser(self.cfg, client)
try:
listener_name = listener.getsockname()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment