Skip to content

Commit de00a6b

Browse files
committed
Use RequestNotExecutedException instead of ConnectionClosedException when failing enqueued requests that never got executed
1 parent 5b1a796 commit de00a6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ public final void onDisconnect() {
580580
final Command command = ioSession.poll();
581581
if (command != null) {
582582
if (command instanceof ExecutableCommand) {
583-
((ExecutableCommand) command).failed(new ConnectionClosedException());
583+
((ExecutableCommand) command).failed(new RequestNotExecutedException());
584584
} else {
585585
command.cancel();
586586
}
@@ -666,7 +666,7 @@ public final void onException(final Exception cause) {
666666
final Command command = ioSession.poll();
667667
if (command != null) {
668668
if (command instanceof ExecutableCommand) {
669-
((ExecutableCommand) command).failed(new ConnectionClosedException());
669+
((ExecutableCommand) command).failed(new RequestNotExecutedException());
670670
} else {
671671
command.cancel();
672672
}

0 commit comments

Comments
 (0)