NIFI-1612: Found a spot within the site-to-site client where the timeout was not utilized properly

Signed-off-by: joewitt <joewitt@apache.org>
This commit is contained in:
Mark Payne 2016-03-09 17:32:41 -05:00 committed by joewitt
parent ce068ffc6c
commit 07d4d7005b
1 changed files with 4 additions and 1 deletions

View File

@ -708,7 +708,10 @@ public class EndpointConnectionPool {
throw new IOException(ex);
}
} else {
final SocketChannel socketChannel = SocketChannel.open(new InetSocketAddress(hostname, port));
final SocketChannel socketChannel = SocketChannel.open();
socketChannel.socket().connect(new InetSocketAddress(hostname, port), commsTimeout);
socketChannel.socket().setSoTimeout(commsTimeout);
commsSession = new SocketChannelCommunicationsSession(socketChannel, destinationUri);
}