Uploaded image for project: 'Axis'
  1. Axis
  2. AXIS-2831

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.4
    • None
    • SAAJ
    • None

    Description

      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")); }

      Attachments

        Activity

          People

            Unassigned Unassigned
            hpzhao Huiping Zhao
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: