You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by jo...@apache.org on 2016/03/13 18:45:52 UTC
[2/2] nifi git commit: NIFI-1612: Found a spot within the
site-to-site client where the timeout was not utilized properly
NIFI-1612: Found a spot within the site-to-site client where the timeout was not utilized properly
Signed-off-by: joewitt <jo...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/07d4d700
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/07d4d700
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/07d4d700
Branch: refs/heads/master
Commit: 07d4d7005b9fbd1147eebce147f2e8172cf0a787
Parents: ce068ff
Author: Mark Payne <ma...@hotmail.com>
Authored: Wed Mar 9 17:32:41 2016 -0500
Committer: joewitt <jo...@apache.org>
Committed: Sun Mar 13 13:40:56 2016 -0400
----------------------------------------------------------------------
.../nifi/remote/client/socket/EndpointConnectionPool.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi/blob/07d4d700/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java
----------------------------------------------------------------------
diff --git a/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java b/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java
index 0dde17d..1990a22 100644
--- a/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java
+++ b/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java
@@ -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);
}