Don't retry APN on bad device token
This commit is contained in:
parent
a5f844bc7d
commit
ed766484d2
|
@ -131,7 +131,9 @@ public class RetryingApnsClient {
|
||||||
|
|
||||||
if (response.isAccepted()) {
|
if (response.isAccepted()) {
|
||||||
future.set(new ApnResult(ApnResult.Status.SUCCESS, null));
|
future.set(new ApnResult(ApnResult.Status.SUCCESS, null));
|
||||||
} else if ("Unregistered".equals(response.getRejectionReason())) {
|
} else if ("Unregistered".equals(response.getRejectionReason()) ||
|
||||||
|
"BadDeviceToken".equals(response.getRejectionReason()))
|
||||||
|
{
|
||||||
future.set(new ApnResult(ApnResult.Status.NO_SUCH_USER, response.getRejectionReason()));
|
future.set(new ApnResult(ApnResult.Status.NO_SUCH_USER, response.getRejectionReason()));
|
||||||
} else {
|
} else {
|
||||||
logger.warn("Got APN failure: " + response.getRejectionReason());
|
logger.warn("Got APN failure: " + response.getRejectionReason());
|
||||||
|
|
Loading…
Reference in New Issue