Skip to content

Commit

Permalink
Make sure SlicedFile is closed properly (#57)
Browse files Browse the repository at this point in the history
Co-authored-by: Per Myren <[email protected]>
  • Loading branch information
Archmonger and pernofence authored Oct 25, 2024
1 parent 6a382da commit 571074c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/servestatic/responders.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def read(self, size=-1):
return data

def close(self):
super().close()
self.fileobj.close()


Expand Down

0 comments on commit 571074c

Please sign in to comment.