You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Georgi Goranov (JIRA)" <ji...@apache.org> on 2016/09/29 13:57:20 UTC

[jira] [Created] (DIRKRB-608) KerberosChannel.timeout has no effect

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)