hyperdrive
hyperdrive copied to clipboard
Add timeout option to all read calls
I need to be able to control whether and how long the timeout for read calls works. At a glance that'll need to cover:
- access
- stat
- lstat
- readdir
- readfile
- createReadStream
Currently, when offline and attempting to do a .readFile() when the data isn't yet synced will cause the node process to exit without throwing an exception.
I did a little test and if we set a default timeout and pass it through, it will throw a nice timeout error before node exits.
Has there been any movement on this issue? Having the ability to timeout calls seems pretty essential.
I think a timeout for download is important as well.