ssbc / ssb-ooo

retrive ssb messages Out Of Order
MIT License
14 stars 4 forks source link

Fix get after close #17

Open regular opened 3 years ago

regular commented 3 years ago

Status quo: We hook ssb.get(). In the function hook, we first call the original get, if that fails, we try to ooo get, and if that also fails, we try the original get again. If flumedb shuts down between the two calls to the original get, it'll throw an unhandled expetion at us when we do the 2nd call. This PR prevents that.

austinfrey commented 3 years ago

@regular how difficult would it be to add a unit test for this?