Commit 9b7e977b authored by Denis Bilenko's avatar Denis Bilenko

wsgi: close the iterator

parent 0c4d78ad
......@@ -103,7 +103,11 @@ class WSGIHandler(object):
try:
try:
result = server.application(env, self.start_response)
self.data.extend(result)
try:
self.data.extend(result)
finally:
if hasattr(result, 'close'):
result.close()
except:
traceback.print_exc()
try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment