axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Huiping Zhao (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Created: (AXIS-2831) JSSESocketFactory doesn't set timeout before doing handshaking between client and server that caused client hung forever if server doesn't respond
Date Fri, 21 May 2010 16:27:18 GMT
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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message