Skip to content
Myr

Close request objects if they support closing.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 775c76a · Browse files · 1 file+3 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−0 removed

  • other:+3 added−0 removed

1 file+3 added−0 removed

modified:flask/ctx.py+3 added
332 unmodified lines
333 self.preserved = False334 if exc is None:335 exc = sys.exc_info()[1]336 self.app.do_teardown_request(exc)337 request_close = getattr(self.request, 'close', None)338 if request_close is not None:339 request_close()340 clear_request = True341342 rv = _request_ctx_stack.pop()343 assert rv is self, 'Popped wrong request context. (%r instead of %r)' \
34 unmodified lines