Skip to content

Commit

Permalink
Fix EQL Blocking IntegTests
Browse files Browse the repository at this point in the history
  • Loading branch information
original-brownbear committed Jul 7, 2021
1 parent fef1874 commit 8fe8868
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,18 +209,8 @@ public <Request extends ActionRequest, Response extends ActionResponse> void app
}
logger.trace("unblocking field caps on " + nodeId);
};
final Thread originalThread = Thread.currentThread();
chain.proceed(task, action, request,
ActionListener.wrap(
resp -> {
if (originalThread == Thread.currentThread()) {
// async if we never exited the original thread
executorService.execute(() -> actionWrapper.accept(resp));
} else {
actionWrapper.accept(resp);
}
},
listener::onFailure)
ActionListener.wrap(resp -> executorService.execute(() -> actionWrapper.accept(resp)), listener::onFailure)
);
} else {
chain.proceed(task, action, request, listener);
Expand Down

0 comments on commit 8fe8868

Please sign in to comment.