mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-16 13:31:30 +00:00
Merge pull request #24 from loki-project/fix-infinite-running
Fix messages infinitely sending.
This commit is contained in:
commit
bf1ee9b4f7
@ -215,7 +215,9 @@ public class PushGroupSendJob extends PushSendJob implements InjectableType {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onShouldRetry(@NonNull Exception exception) {
|
public boolean onShouldRetry(@NonNull Exception exception) {
|
||||||
if (exception instanceof IOException) return true;
|
if (exception instanceof IOException) return true;
|
||||||
if (exception instanceof RetryLaterException) return true;
|
|
||||||
|
// Loki - Disable since we have our own retrying
|
||||||
|
// if (exception instanceof RetryLaterException) return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,7 +179,8 @@ public class PushMediaSendJob extends PushSendJob implements InjectableType {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onShouldRetry(@NonNull Exception exception) {
|
public boolean onShouldRetry(@NonNull Exception exception) {
|
||||||
if (exception instanceof RetryLaterException) return true;
|
// Loki - Disable since we have our own retrying
|
||||||
|
// if (exception instanceof RetryLaterException) return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ public abstract class PushSendJob extends SendJob {
|
|||||||
.setQueue(destination.serialize())
|
.setQueue(destination.serialize())
|
||||||
.addConstraint(NetworkConstraint.KEY)
|
.addConstraint(NetworkConstraint.KEY)
|
||||||
.setLifespan(TimeUnit.DAYS.toMillis(1))
|
.setLifespan(TimeUnit.DAYS.toMillis(1))
|
||||||
.setMaxAttempts(Parameters.UNLIMITED)
|
.setMaxAttempts(3)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +134,8 @@ public class PushTextSendJob extends PushSendJob implements InjectableType {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onShouldRetry(@NonNull Exception exception) {
|
public boolean onShouldRetry(@NonNull Exception exception) {
|
||||||
if (exception instanceof RetryLaterException) return true;
|
// Loki - Disable since we have our own retrying
|
||||||
|
// if (exception instanceof RetryLaterException) return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user