directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Georgi Goranov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DIRKRB-608) KerberosChannel.timeout has no effect
Date Thu, 29 Sep 2016 13:57:20 GMT
Georgi Goranov created DIRKRB-608:
-------------------------------------

             Summary: KerberosChannel.timeout has no effect
                 Key: DIRKRB-608
                 URL: https://issues.apache.org/jira/browse/DIRKRB-608
             Project: Directory Kerberos
          Issue Type: Bug
    Affects Versions: 2.0.0-M23
            Reporter: Georgi Goranov


protected void openConnection( String hostName, int  portNo, int timeOut, boolean isUdp )
throws IOException
    {
        this.useUdp = isUdp;
        this.timeOut = timeOut;
        
        if ( isUdp )
        {
            udpServerAddr = new InetSocketAddress( hostName, portNo );
            udpSocket = new DatagramSocket();
        }
        else
        {
            tcpSocket = new Socket( hostName, portNo );
            tcpSocket.setSoTimeout( ( int ) timeOut );
            in = new DataInputStream( tcpSocket.getInputStream() );
            out = tcpSocket.getOutputStream();
        }
    }


Socket is created and an attempt to establish connection is made at line 
tcpSocket = new Socket( hostName, portNo );

but  after that changing timeout is done ( tcpSocket.setSoTimeout( ( int )timeOut ); )


Potential fix:
tcpSocket = new Socket( );
tcpSocket.connect( hostname,portNo, timeout );





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

Mime
View raw message