From bcdff2f8bac85960ce8c44a7eb221d3ae46b13ef Mon Sep 17 00:00:00 2001 From: Arnaud Date: Tue, 21 Oct 2025 07:40:47 +0200 Subject: [PATCH] Defer download cancel after the download session is created --- codex/download.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/codex/download.go b/codex/download.go index 2bc476d..8b67b55 100644 --- a/codex/download.go +++ b/codex/download.go @@ -199,6 +199,8 @@ func (node CodexNode) DownloadStream(ctx context.Context, cid string, options Do return err } + defer node.DownloadCancel(cid) + var cFilepath = C.CString(options.Filepath) defer C.free(unsafe.Pointer(cFilepath))