clean connected nodes when closing a client
This commit is contained in:
parent
549e9c7019
commit
7bdae651c3
|
@ -157,8 +157,13 @@ public class TransportClientNodesService extends AbstractComponent {
|
|||
public void close() {
|
||||
closed = true;
|
||||
nodesSamplerFuture.cancel(true);
|
||||
for (DiscoveryNode listedNode : listedNodes)
|
||||
for (DiscoveryNode node : nodes) {
|
||||
transportService.disconnectFromNode(node);
|
||||
}
|
||||
for (DiscoveryNode listedNode : listedNodes) {
|
||||
transportService.disconnectFromNode(listedNode);
|
||||
}
|
||||
nodes = ImmutableList.of();
|
||||
}
|
||||
|
||||
interface NodeSampler {
|
||||
|
|
Loading…
Reference in New Issue