Browse Source

Close request objects if they support closing.

pull/751/head
Armin Ronacher 12 years ago
parent
commit
ffd9296507
  1. 3
      flask/ctx.py

3
flask/ctx.py

@ -334,6 +334,9 @@ class RequestContext(object):
if exc is None:
exc = sys.exc_info()[1]
self.app.do_teardown_request(exc)
request_close = getattr(self.request, 'close', None)
if request_close is not None:
request_close()
clear_request = True
rv = _request_ctx_stack.pop()

Loading…
Cancel
Save