Fix multiple exception crash in rx message send flow.
This commit is contained in:
parent
08a407dc23
commit
133b7ef3f1
1 changed files with 4 additions and 1 deletions
|
@ -158,6 +158,7 @@ import javax.annotation.Nullable;
|
||||||
import io.reactivex.rxjava3.core.Observable;
|
import io.reactivex.rxjava3.core.Observable;
|
||||||
import io.reactivex.rxjava3.core.Scheduler;
|
import io.reactivex.rxjava3.core.Scheduler;
|
||||||
import io.reactivex.rxjava3.core.Single;
|
import io.reactivex.rxjava3.core.Single;
|
||||||
|
import io.reactivex.rxjava3.exceptions.CompositeException;
|
||||||
import io.reactivex.rxjava3.schedulers.Schedulers;
|
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||||
import kotlin.Unit;
|
import kotlin.Unit;
|
||||||
import okio.ByteString;
|
import okio.ByteString;
|
||||||
|
@ -2164,7 +2165,9 @@ public class SignalServiceMessageSender {
|
||||||
.lastOrError()
|
.lastOrError()
|
||||||
.blockingGet();
|
.blockingGet();
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
Throwable cause = e.getCause();
|
Throwable cause = e instanceof CompositeException ? ((CompositeException) e).getExceptions().get(0)
|
||||||
|
: e.getCause();
|
||||||
|
|
||||||
if (cause instanceof IOException) {
|
if (cause instanceof IOException) {
|
||||||
throw (IOException) cause;
|
throw (IOException) cause;
|
||||||
} else if (cause instanceof InterruptedException) {
|
} else if (cause instanceof InterruptedException) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue