From 21f7282128b372d111e751197c5d74cdaa7141af Mon Sep 17 00:00:00 2001 From: Randall Leeds Date: Fri, 8 Jul 2011 14:38:32 -0700 Subject: [PATCH] remove redundant exception handling an async base StopIteration is simply propogated, so there's no reason to catch it. The catch-all exception is also caught and logged in handle(), but broken pipe errors are ignored. The redundant catch here was generating excess logging by calling handle_error for a broken pipe which fails to send the error because the client has already disconnected. --- gunicorn/workers/async.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/gunicorn/workers/async.py b/gunicorn/workers/async.py index 486acec3..108f0e51 100644 --- a/gunicorn/workers/async.py +++ b/gunicorn/workers/async.py @@ -71,12 +71,6 @@ class AsyncWorker(base.Worker): respiter.close() if resp.should_close(): raise StopIteration() - except StopIteration: - raise - except Exception, e: - #Only send back traceback in HTTP in debug mode. - self.handle_error(sock, e) - return False finally: try: self.cfg.post_request(self, req)