Defer download cancel after the download session is created

This commit is contained in:
Arnaud 2025-10-21 07:40:47 +02:00
parent 3d66b10fa9
commit bcdff2f8ba
No known key found for this signature in database
GPG Key ID: 20E40A5D3110766F

View File

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