Mercurial > public > mercurial-scm > hg
changeset 52562:5dcf40af7c2d
largefiles: add a TODO about fixing a file descriptor leak
I have no idea how to fix this because `wireprototypes.streamreslegacy()`
doesn't consume the generator before the return from this method, and then
things get lost in the wire protocol layers.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 16 Dec 2024 20:38:13 -0500 |
parents | 1a7bc756e3f2 |
children | 30f81efce00b |
files | hgext/largefiles/proto.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/largefiles/proto.py Mon Dec 16 20:28:58 2024 -0500 +++ b/hgext/largefiles/proto.py Mon Dec 16 20:38:13 2024 -0500 @@ -71,6 +71,8 @@ raise error.Abort( _(b'requested largefile %s not present in cache') % sha ) + + # TODO: fix the fd leak here f = open(filename, 'rb') length = os.fstat(f.fileno())[6]