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 committed by Eric
parent bafca77e13
commit f98a6b25fc
No known key found for this signature in database

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