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))