Thrift
  1. Thrift
  2. THRIFT-1523

clientTimeout not worked as expected in TServerSocket created by TSSLTransportFactory

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.6.1, 0.7, 0.8, 0.9
    • Fix Version/s: 0.9
    • Component/s: Java - Library
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      TSSLTransportFactory has method

      public static TServerSocket getServerSocket(int port, int clientTimeout)

      there is parameter clientTimeout that need to close idle client connections (after clientTimeout amount of millis of client inactivity server closes opened connection themself, not waiting while client called close() method). This parameter work fine when create TServerSocket through new, but not working at all when creating TServerSocket through TSSLTransportFactory.getServerSocket

      1. clientTimeout.patch
        0.5 kB
        Alexey Sviridov

        Activity

        Jake Farrell made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Alexey Sviridov [ sviridov_alexey ]
        Fix Version/s 0.9 [ 12316294 ]
        Resolution Fixed [ 1 ]
        Alexey Sviridov made changes -
        Comment [ I'm have a simple patch, but dunno how to attach it here...
        so i'm post it right here
        {noformat}
        == begin of file clientTimeout.patch ===============
        --- TSSLTransportFactory-orig.java 2011-11-06 16:40:42.000000000 +0700
        +++ TSSLTransportFactory-patched.java 2012-02-25 22:54:12.000000000 +0700
        @@ -112,7 +112,7 @@
               if (params != null && params.cipherSuites != null) {
                 serverSocket.setEnabledCipherSuites(params.cipherSuites);
               }
        - return new TServerSocket(serverSocket);
        + return new TServerSocket(serverSocket,timeout);
             } catch (Exception e) {
               throw new TTransportException("Could not bind to port " + port, e);
             }

        == end of file clientTimeout.patch ===============
        {noformat}
        Please, correct me if i'm wrong ]
        Alexey Sviridov made changes -
        Field Original Value New Value
        Attachment clientTimeout.patch [ 12516133 ]
        Alexey Sviridov created issue -

          People

          • Assignee:
            Alexey Sviridov
            Reporter:
            Alexey Sviridov
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development