Closed gnarea closed 2 years ago
I wasn't able to reproduce the issue. The only place that exception is thrown is from inside Awaladroid ReceiveMessages#collectParcels
and we're already handling ServerException
there, a superclass of ServerConnectionException
of the crash log. And, that scenario is covered by a test.
We only collect parcels when we're notified on the ping app. And this call should be safe GatewayClient.receiveMessages().collect(receivePong::receive)
since that only subscribes to a stream of parcels that we receive, but it's not the stream collecting the parcels. Since it's disconnected from the stuff that might fail when connecting with the Gateway, developers won't need to re-subscribe to it.
Because right now it's crashing due to https://github.com/relaycorp/awala-endpoint-android/issues/75.
One way to handle it is by catching the appropriate exception in the statement below, and re-doing the binding to the gateway.
https://github.com/relaycorp/awala-ping-android/blob/e4e5d87eec6b953989f117d9d67e5c64404ef1df/app/src/main/java/tech/relaycorp/ping/App.kt#L45
Alternatively, we could do something in awaladroid that won't require changes to this app. But is there anything reliable that we can do?