File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 1+ Fixed file handle leak when content app access triggers downloads due to on_demand or streamed policy.
Original file line number Diff line number Diff line change @@ -1334,6 +1334,12 @@ async def finalize():
13341334 "on-demand-downloading/#on-demand-and-streamed-limitations>"
13351335 )
13361336
1337+ # manually close the DownloadFactory's (HTTP-)session, the next artifact-download will
1338+ # create a new DownloadFactory anyway because it will use a new remote-object.
1339+ # Leaving it open also left open file-descriptors to /dev/urandom. Most likely these FDs are
1340+ # held by the underlying SSL library.
1341+ await downloader .session .close ()
1342+
13371343 if save_artifact and remote .policy != Remote .STREAMED :
13381344 content_artifacts = await asyncio .shield (
13391345 sync_to_async (self ._save_artifact )(download_result , remote_artifact , request )
You can’t perform that action at this time.
0 commit comments