Skip to content

Commit d07e2f6

Browse files
iGabonKostyaSha
authored andcommitted
Bugfix:donot throw RuntimeException when a error occured in awaitComp… (#700)
* Bugfix:donot throw RuntimeException when a error occured in awaitCompletion(long,TimeUnit) * Fix indentation * fix format error,use docker-java-formatter.xml
1 parent 74d506d commit d07e2f6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/github/dockerjava/core/async/ResultCallbackTemplate.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ public RC_T awaitCompletion() throws InterruptedException {
9999
* before {@link ResultCallback#onComplete()} was called.
100100
*/
101101
public boolean awaitCompletion(long timeout, TimeUnit timeUnit) throws InterruptedException {
102-
return completed.await(timeout, timeUnit);
102+
boolean result = completed.await(timeout, timeUnit);
103+
getFirstError();
104+
return result;
103105
}
104106

105107
/**

0 commit comments

Comments
 (0)