Skip to content

Commit c5d707c

Browse files
committed
Classic to async facade to propagate ConnectionClosedException to the caller
1 parent a099f9c commit c5d707c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/classic/ClassicToAsyncSupport.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
import java.io.IOException;
3131

32+
import org.apache.hc.core5.http.ConnectionClosedException;
3233
import org.apache.hc.core5.http.HttpException;
3334

3435
final class ClassicToAsyncSupport {
@@ -40,6 +41,8 @@ static void rethrow(final Throwable ex) throws IOException {
4041
throw (Error) ex;
4142
} else if (ex instanceof RuntimeException) {
4243
throw (RuntimeException) ex;
44+
} else if (ex instanceof ConnectionClosedException) {
45+
throw (ConnectionClosedException) ex;
4346
} else if (ex instanceof IOException) {
4447
throw new TransportException((IOException) ex);
4548
} else if (ex instanceof HttpException) {

0 commit comments

Comments
 (0)