register the future with teh listener when deleting an index, so it can be canceled

This commit is contained in:
kimchy 2011-04-19 15:25:02 +03:00
parent e40499f35f
commit 32127c4d73
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ public class MetaDataDeleteIndexService extends AbstractComponent {
}; };
nodeIndexDeletedAction.add(nodeIndexDeleteListener); 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() { @Override public void run() {
listener.onResponse(new Response(false)); listener.onResponse(new Response(false));
nodeIndexDeletedAction.remove(nodeIndexDeleteListener); nodeIndexDeletedAction.remove(nodeIndexDeleteListener);