holepunchto / hyperdrive

Hyperdrive is a secure, real time distributed file system
Apache License 2.0
1.86k stars 135 forks source link

wait option not supported any more #300

Closed juliangruber closed 1 year ago

juliangruber commented 3 years ago

According to the docs, you can pass wait: false to stat() and related methods. I tried this and it doesn't seem to change the function's behavior, and looking at the code I also don't see where this is implemented.

The reason I need this option is because a drive.stat('/') needs to cancel if the drive's content haven't yet been downloaded, otherwise the process keeps hanging forever.

I'd be interested in helping getting this back, unless there is another way.

juliangruber commented 3 years ago

My temporary fix is to cancel the operation if it doesn't return in the same tick.