Skip to content

Commit 5e04e3b

Browse files
author
Davey Fong
committed
Fixed: Exception black list in RetryHandler should contains SSLException to skip retry for SSLPeerUnverifiedException in addition to SSLHandshakeException, or else would caus connection hang.
1 parent b174344 commit 5e04e3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import java.util.HashSet;
3131
import java.util.Iterator;
3232

33-
import javax.net.ssl.SSLHandshakeException;
33+
import javax.net.ssl.SSLException;
3434

3535
import org.apache.http.NoHttpResponseException;
3636
import org.apache.http.client.HttpRequestRetryHandler;
@@ -56,7 +56,7 @@ class RetryHandler implements HttpRequestRetryHandler {
5656
// never retry timeouts
5757
exceptionBlacklist.add(InterruptedIOException.class);
5858
// never retry SSL handshake failures
59-
exceptionBlacklist.add(SSLHandshakeException.class);
59+
exceptionBlacklist.add(SSLException.class);
6060
}
6161

6262
private final int maxRetries;

0 commit comments

Comments
 (0)