mirror of
https://github.com/oxen-io/session-android.git
synced 2025-11-06 18:30:50 +00:00
Wrapped envelope handing code inside a try-catch.
This commit is contained in:
@@ -25,6 +25,7 @@ public abstract class PushReceivedJob extends BaseJob {
|
|||||||
|
|
||||||
public void processEnvelope(@NonNull SignalServiceEnvelope envelope) {
|
public void processEnvelope(@NonNull SignalServiceEnvelope envelope) {
|
||||||
synchronized (RECEIVE_LOCK) {
|
synchronized (RECEIVE_LOCK) {
|
||||||
|
try {
|
||||||
if (envelope.hasSource()) {
|
if (envelope.hasSource()) {
|
||||||
Address source = Address.fromExternal(context, envelope.getSource());
|
Address source = Address.fromExternal(context, envelope.getSource());
|
||||||
Recipient recipient = Recipient.from(context, source, false);
|
Recipient recipient = Recipient.from(context, source, false);
|
||||||
@@ -42,6 +43,9 @@ public abstract class PushReceivedJob extends BaseJob {
|
|||||||
} else {
|
} else {
|
||||||
Log.w(TAG, "Received envelope of unknown type: " + envelope.getType());
|
Log.w(TAG, "Received envelope of unknown type: " + envelope.getType());
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.d("Loki", "Failed to process envelope: " + e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user