[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14147435#comment-14147435
 ] 

Kurian Abraham edited comment on HTTPCLIENT-1555 at 9/25/14 5:59 AM:
---------------------------------------------------------------------

The SSL handshake timeout is working, but I don't currently have the means to 
test a HTTP layer socket timeout after the SSL handshake has completed. 
Shouldn't a call to sock.setSoTimeout(); be placed after the call to 
createLayeredSocket() to set the timeout again from the configuration? The 
SSLCertificateSocketFactory documentation says the socket timeout is set to 0 
after the handshake.

Also you're setting
if (connectTimeout > 0 && sock.getSoTimeout() == 0) {
    sock.setSoTimeout(connectTimeout);
}
before the plain TCP connection. What if the user WANTS an infinite socket 
timeout for the SSL handshake?


was (Author: kathampy):
The SSL handshake timeout is working, but I don't currently have the means to 
test a HTTP layer socket timeout after the SSL handshake has completed. 
Shouldn't a call to sock.setSoTimeout(); be placed after the call to 
createLayeredSocket() to set the timeout again from the configuration? The 
SSLCertificateSocketFactory documentation says the socket timeout is set to 0 
after the handshake.

Also you're setting
if (connectTimeout > 0 && sock.getSoTimeout() == 0) {
    sock.setSoTimeout(connectTimeout);
}
before the plain TCP connection. What if the users WANTS an infinite socket 
timeout for the SSL handshake?

> Socket timeout not applied to SSLSocketFactory & it waits indefinitely.
> -----------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1555
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1555
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: Android Port
>    Affects Versions: 4.3.5
>            Reporter: Kurian Abraham
>             Fix For: 4.3.5.1-android
>
>
> SSLCertificateSocketFactory is created with a socket timeout of 0. This 
> causes requests to hang indefinitely. The socket timeout from the request 
> config must be applied.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to