Skip to content

Commit f4ad11b

Browse files
committed
Merge pull request android-async-http#176 from daveyfong/connection-hang-fix
Fixed connection hang when getting SSLPeerUnverifiedException like "No peer certificate"
2 parents 6e91a82 + 5e04e3b commit f4ad11b

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)