Before this commit, this busy-loop combined with the resource leak would quickly
consume all available memory on the machine, making Linux invoke the OOM
killer (in the best case) or run out of memory and just hang (in my case).
This commit plugs the resource leak, meaning the torrent CLI can now print
errors all day long without consuming all the machine’s memory.
When the torrent CLI program is started without network connectivity, it busy-loops with error message:
torrent.go:1700: "distri-qemu-serial.img.zst": error announcing \""distri-qemu-serial.img.zst\"" to DHT: getting starting nodes: nothing resolved
Before this commit, this busy-loop combined with the resource leak would quickly consume all available memory on the machine, making Linux invoke the OOM killer (in the best case) or run out of memory and just hang (in my case).
This commit plugs the resource leak, meaning the torrent CLI can now print errors all day long without consuming all the machine’s memory.