hypercore-protocol / hypercore-next

Hypercore 10 is an append only log with multi-writer primitives built in.
MIT License
150 stars 15 forks source link

Support autoClose option #31

Closed andrewosh closed 3 years ago

andrewosh commented 3 years ago

It'd be nice to have an autoClose constructor option that automatically closes the Hypercore whenever its session count drops to 0.

This would need to account for the initial session count being 0 (e.g. wait for the first session to be created before counting subsequent sessions).