| | 6 | |
| | 7 | {{{#!diff |
| | 8 | diff --git a/django/http/response.py b/django/http/response.py |
| | 9 | index 0d756403db..65dfe3a786 100644 |
| | 10 | --- a/django/http/response.py |
| | 11 | +++ b/django/http/response.py |
| | 12 | @@ -324,6 +324,8 @@ def make_bytes(self, value): |
| | 13 | # The WSGI server must call this method upon completion of the request. |
| | 14 | # See http://blog.dscpl.com.au/2012/10/obligations-for-calling-close-on.html |
| | 15 | def close(self): |
| | 16 | + if self.closed: |
| | 17 | + return |
| | 18 | for closer in self._resource_closers: |
| | 19 | try: |
| | 20 | closer() |
| | 21 | }}} |