Cancel the download in the example to avoid to keep a future and stream running

This commit is contained in:
Arnaud 2025-10-02 08:39:38 +02:00
parent 5eb5ace4f2
commit b70a4ef2a7
No known key found for this signature in database
GPG Key ID: B8FBC178F10CA7AE

View File

@ -1278,6 +1278,12 @@ func main() {
log.Println("Codex Download Chunk finished. Size:", len(chunk))
if err := node.CodexDownloadCancel(cid); err != nil {
log.Fatal("Error happened:", err.Error())
}
log.Println("Codex Download Cancel finished.")
manifest, err := node.CodexDownloadManifest(cid)
if err != nil {
log.Fatal("Error happened:", err.Error())