From 32127c4d73357da9bf657fcafe70ba3e9842870e Mon Sep 17 00:00:00 2001 From: kimchy Date: Tue, 19 Apr 2011 15:25:02 +0300 Subject: [PATCH] register the future with teh listener when deleting an index, so it can be canceled --- .../cluster/metadata/MetaDataDeleteIndexService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/MetaDataDeleteIndexService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/MetaDataDeleteIndexService.java index 8b350430da6..eac2f2096a6 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/MetaDataDeleteIndexService.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/metadata/MetaDataDeleteIndexService.java @@ -130,7 +130,7 @@ public class MetaDataDeleteIndexService extends AbstractComponent { }; nodeIndexDeletedAction.add(nodeIndexDeleteListener); - threadPool.schedule(request.timeout, ThreadPool.Names.SAME, new Runnable() { + listener.future = threadPool.schedule(request.timeout, ThreadPool.Names.SAME, new Runnable() { @Override public void run() { listener.onResponse(new Response(false)); nodeIndexDeletedAction.remove(nodeIndexDeleteListener);