JSSESocketFactory doesn't set timeout before doing handshaking between client 
and server that caused client hung forever if server doesn't respond
--------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: AXIS-2831
                 URL: https://issues.apache.org/jira/browse/AXIS-2831
             Project: Axis
          Issue Type: Bug
          Components: SAAJ
    Affects Versions: 1.4
            Reporter: Huiping Zhao


Event though timeout is set on org.apache.axis.client.Stub, during connection 
set up, client still hangs forever if server doesn't respond.

Found out that in JSSESocketFactory.java, the code is not set timeout before 
calling handshaking between client and server which will hang forever if server 
doesn't response.

Made a fix to set the timeout before handshaking in JSSESocketFactory.java

String obj = (String)attributes.get(DefaultSocketFactory.CONNECT_TIMEOUT);
        int timeout = 0;
        if (obj != null)
            timeout = Integer.parseInt(obj);
        if(timeout > 0) {
            sslSocket.setSoTimeout(timeout);
        }
        ((SSLSocket) sslSocket).startHandshake();
        if (log.isDebugEnabled()) {
            log.debug(Messages.getMessage("createdSSL00"));
        }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to