ssbc / ssb-social-index

scuttlebutt plugin for getting reduced state based on the author's social graph
5 stars 2 forks source link

Fix read after close #8

Closed regular closed 2 years ago

regular commented 2 years ago

If flumdb shuts down while we wait for the callback from getAuthor(), attempting to read the index results in a crash. This happens in unit tests, especially when ssb-ooo is involved (then ssb.get() might take 5 secs to call back)

This PR prevents the crash-on-exit.

staltz commented 2 years ago

Released 1.1.1