Skip to content

Commit

Permalink
StopIteration shouldn't be catched at this level.
Browse files Browse the repository at this point in the history
fix #790
  • Loading branch information
benoitc committed Jun 14, 2014
1 parent 68cd2b9 commit f41f86c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gunicorn/workers/async.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ def handle_request(self, listener_name, req, sock, addr):
respiter.close()
if resp.should_close():
raise StopIteration()
except StopIteration:
raise
except Exception:
if resp and resp.headers_sent:
# If the requests have already been sent, we should close the
Expand Down

1 comment on commit f41f86c

@goodcjw
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the same issue with gunicorn==19.0.0
confirm that this fix works.

Please sign in to comment.