Commit 0998a7a3 authored by Vinay Sajip's avatar Vinay Sajip

Issue #19523: Closed FileHandler leak which occurred when delay was set.

parent 803c3341
...@@ -976,8 +976,10 @@ class FileHandler(StreamHandler): ...@@ -976,8 +976,10 @@ class FileHandler(StreamHandler):
self.flush() self.flush()
if hasattr(self.stream, "close"): if hasattr(self.stream, "close"):
self.stream.close() self.stream.close()
StreamHandler.close(self)
self.stream = None self.stream = None
# Issue #19523: call unconditionally to
# prevent a handler leak when delay is set
StreamHandler.close(self)
finally: finally:
self.release() self.release()
......
...@@ -13,6 +13,8 @@ Core and Builtins ...@@ -13,6 +13,8 @@ Core and Builtins
Library Library
------- -------
- Issue #19523: Closed FileHandler leak which occurred when delay was set.
- Issue #13674: Prevented time.strftime from crashing on Windows when given - Issue #13674: Prevented time.strftime from crashing on Windows when given
a year before 1900 and a format of %y. a year before 1900 and a format of %y.
......
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