What is Nostr?
Jesse / Jesse de Wit
npub18hw…v8du
2024-10-29 13:45:12

Jesse on Nostr: Over time got some reports of strange errors in the breez sdk. Sometimes there were ...

Over time got some reports of strange errors in the breez sdk. Sometimes there were DNS errors, sometimes payments not working, sometimes requests not arriving at the greenlight servers at all.

Turns out it's app hibernation causing these issues. The rust code would still be running, but it wouldn't get any resources to execute. That causes grpc channels to fail functioning after coming back from hibernation.

Adding a 'sleeper loop' to the Breez SDK. It sleeps in a loop for one second. If the sleep takes a long time, it means the app hibernated. Then reconnect any grpc clients.

It's an interesting dynamic to guard against. Thr SDK should becone more robust for hibernation this way soon.
Author Public Key
npub18hwpk5qep3ptnmzatq22ptwr9mth7ccrku56rdntwpxjxlkfyr2qrav8du