Skip to content

Commit 89e0028

Browse files
committed
1 parent 918cfa0 commit 89e0028

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

library/src/com/loopj/android/http/RetryHandler.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ public boolean retryRequest(IOException exception, int executionCount, HttpConte
8888
if (retry) {
8989
// resend all idempotent requests
9090
HttpUriRequest currentReq = (HttpUriRequest) context.getAttribute(ExecutionContext.HTTP_REQUEST);
91-
String requestType = currentReq != null ? currentReq.getMethod() : "";
91+
if (currentReq == null) {
92+
return false;
93+
}
94+
String requestType = currentReq.getMethod();
9295
retry = !requestType.equals("POST");
9396
}
9497

0 commit comments

Comments
 (0)