You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2015/11/02 20:32:40 UTC
[43/50] [abbrv] nifi git commit: NIFI-1068 Fix EndpointConnectionPool
to properly remove connections from activeConnections when terminating
connections
NIFI-1068 Fix EndpointConnectionPool to properly remove connections from activeConnections when terminating connections
Signed-off-by: Mark Payne <ma...@hotmail.com>
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/NIFI-730
Commit: 37e2f178f8f0e4a0fed022e2541a64e97e4897d4
Parents: ad849c7
Author: Joseph Percivall <jo...@yahoo.com>
Authored: Mon Oct 26 17:35:23 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
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());
}