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 @@ -1335,6 +1335,12 @@ async def finalize():
13351335 "on-demand-downloading/#on-demand-and-streamed-limitations>"
13361336 )
13371337
1338+ # manually close the DownloadFactory's (HTTP-)session, the next artifact-download will
1339+ # create a new DownloadFactory anyway because it will use a new remote-object.
1340+ # Leaving it open also left open file-descriptors to /dev/urandom. Most likely these FDs are
1341+ # held by the underlying SSL library.
1342+ await downloader .session .close ()
1343+
13381344 if save_artifact and remote .policy != Remote .STREAMED :
13391345 content_artifacts = await asyncio .shield (
13401346 sync_to_async (self ._save_artifact )(download_result , remote_artifact , request )
You can’t perform that action at this time.
0 commit comments