diff --git a/CHANGELOG.md b/CHANGELOG.md index 9441147..a506fda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,9 @@ Using the following categories, list your changes in this order: ## [Unreleased] -- Nothing (yet) +### Fixed + +- Make sure WSGI `SlicedFile` is closed properly to prevent memory leaks. ## [2.1.0] - 2024-10-02 diff --git a/src/servestatic/responders.py b/src/servestatic/responders.py index e83d191..f29c62d 100644 --- a/src/servestatic/responders.py +++ b/src/servestatic/responders.py @@ -68,6 +68,7 @@ def read(self, size=-1): return data def close(self): + super().close() self.fileobj.close()