mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-01 08:29:09 +00:00
use cached thread pool for notifying on disconnections
This commit is contained in:
parent
6dcc04b59c
commit
9f72a8d68b
@ -271,7 +271,7 @@ public class TransportService extends AbstractLifecycleComponent<TransportServic
|
||||
}
|
||||
|
||||
@Override public void raiseNodeDisconnected(final DiscoveryNode node) {
|
||||
threadPool.execute(new Runnable() {
|
||||
threadPool.cached().execute(new Runnable() {
|
||||
@Override public void run() {
|
||||
for (TransportConnectionListener connectionListener : connectionListeners) {
|
||||
connectionListener.onNodeDisconnected(node);
|
||||
@ -284,7 +284,7 @@ public class TransportService extends AbstractLifecycleComponent<TransportServic
|
||||
if (holderToNotify != null) {
|
||||
// callback that an exception happened, but on a different thread since we don't
|
||||
// want handlers to worry about stack overflows
|
||||
threadPool.execute(new Runnable() {
|
||||
threadPool.cached().execute(new Runnable() {
|
||||
@Override public void run() {
|
||||
holderToNotify.handler().handleException(new NodeDisconnectedException(node, holderToNotify.action()));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user