RangerMauve / hypercore-fetch

Implementation of Fetch that uses the Hyper SDK for loading p2p content
MIT License
37 stars 13 forks source link

Close drives after finishing request #19

Open RangerMauve opened 4 years ago

RangerMauve commented 4 years ago

We currently have a memory leak where any drives that get processed with dat-fetch are loaded indefinitely.

To solve this we should call drive.close after the request is finished.

This will mean that applications will need to implement their own methods for seeding drives.

Maybe this should come with a PIN and UNPIN method for keeping a drive online and seeded?