Skip to content

Commit 3781c31

Browse files
Assert isDone()
1 parent 413640a commit 3781c31

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

server/src/main/java/org/elasticsearch/common/util/concurrent/EsExecutors.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ public static EsThreadPoolExecutor newAutoQueueFixed(String name, int size, int
124124
*/
125125
public static Throwable rethrowErrors(Runnable runnable) {
126126
if (runnable instanceof RunnableFuture) {
127+
assert ((RunnableFuture) runnable).isDone();
127128
try {
128129
((RunnableFuture) runnable).get();
129130
} catch (final Exception e) {

0 commit comments

Comments
 (0)