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)