[PING] Don't bubble up exception if we are shutting down and ping schedules get rejected
This commit is contained in:
parent
0ff44d4d27
commit
1368229075
|
@ -39,6 +39,7 @@ import org.elasticsearch.common.unit.TimeValue;
|
||||||
import org.elasticsearch.common.util.concurrent.AbstractRunnable;
|
import org.elasticsearch.common.util.concurrent.AbstractRunnable;
|
||||||
import org.elasticsearch.common.util.concurrent.ConcurrentCollections;
|
import org.elasticsearch.common.util.concurrent.ConcurrentCollections;
|
||||||
import org.elasticsearch.common.util.concurrent.EsExecutors;
|
import org.elasticsearch.common.util.concurrent.EsExecutors;
|
||||||
|
import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException;
|
||||||
import org.elasticsearch.discovery.zen.elect.ElectMasterService;
|
import org.elasticsearch.discovery.zen.elect.ElectMasterService;
|
||||||
import org.elasticsearch.discovery.zen.ping.PingContextProvider;
|
import org.elasticsearch.discovery.zen.ping.PingContextProvider;
|
||||||
import org.elasticsearch.discovery.zen.ping.ZenPing;
|
import org.elasticsearch.discovery.zen.ping.ZenPing;
|
||||||
|
@ -240,6 +241,9 @@ public class UnicastZenPing extends AbstractLifecycleComponent<ZenPing> implemen
|
||||||
sendPingsHandler.close();
|
sendPingsHandler.close();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} catch (EsRejectedExecutionException ex) { // TODO: remove this once ScheduledExecutor has support for AbstractRunnable
|
||||||
|
sendPingsHandler.close();
|
||||||
|
// we are shutting down
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
sendPingsHandler.close();
|
sendPingsHandler.close();
|
||||||
throw new ElasticsearchException("Ping execution failed", e);
|
throw new ElasticsearchException("Ping execution failed", e);
|
||||||
|
|
Loading…
Reference in New Issue