Repository: nifi Updated Branches: refs/heads/master ad849c77d -> 37e2f178f
NIFI-1068 Fix EndpointConnectionPool to properly remove connections from activeConnections when terminating connections Signed-off-by: Mark Payne <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/37e2f178 Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/37e2f178 Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/37e2f178 Branch: refs/heads/master Commit: 37e2f178f8f0e4a0fed022e2541a64e97e4897d4 Parents: ad849c7 Author: Joseph Percivall <[email protected]> Authored: Mon Oct 26 17:35:23 2015 -0400 Committer: Mark Payne <[email protected]> Committed: Sun Nov 1 14:47:23 2015 -0500 ---------------------------------------------------------------------- .../apache/nifi/remote/client/socket/EndpointConnectionPool.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi/blob/37e2f178/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 b162b3f..88a34aa 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 @@ -820,12 +820,13 @@ public class EndpointConnectionPool { for (final BlockingQueue<EndpointConnection> connectionQueue : connectionQueueMap.values()) { EndpointConnection state; while ((state = connectionQueue.poll()) != null) { - cleanup(state.getSocketClientProtocol(), state.getPeer()); + terminate(state); } } } public void terminate(final EndpointConnection connection) { + activeConnections.remove(connection); cleanup(connection.getSocketClientProtocol(), connection.getPeer()); }
