mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 12:38:33 +00:00
Fix multiple exception crash in rx message send flow.
This commit is contained in:
committed by
Greyson Parrelli
parent
08a407dc23
commit
133b7ef3f1
@@ -158,6 +158,7 @@ import javax.annotation.Nullable;
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import io.reactivex.rxjava3.core.Scheduler;
|
||||
import io.reactivex.rxjava3.core.Single;
|
||||
import io.reactivex.rxjava3.exceptions.CompositeException;
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
import kotlin.Unit;
|
||||
import okio.ByteString;
|
||||
@@ -2164,7 +2165,9 @@ public class SignalServiceMessageSender {
|
||||
.lastOrError()
|
||||
.blockingGet();
|
||||
} catch (RuntimeException e) {
|
||||
Throwable cause = e.getCause();
|
||||
Throwable cause = e instanceof CompositeException ? ((CompositeException) e).getExceptions().get(0)
|
||||
: e.getCause();
|
||||
|
||||
if (cause instanceof IOException) {
|
||||
throw (IOException) cause;
|
||||
} else if (cause instanceof InterruptedException) {
|
||||
|
||||
Reference in New Issue
Block a user