升级到Android 2.3.4后,我遇到以下异常:
javax.net.ssl.SSLException: Read error: ssl=0x*: I/O error during system call, Connection timed out
at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_read(Native Method)
at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:788)
早期版本的Android工作正常。任何提示?
答案 0 :(得分:4)
我已明确指定SSL超时,一切正常:
val schemeRegistry = client.getConnectionManager.getSchemeRegistry
schemeRegistry.register(new Scheme("https", SSLCertificateSocketFactory.getHttpSocketFactory(timeout,
new SSLSessionCache(context)), 443))