File tree 1 file changed +8
-4
lines changed
core/src/main/java/io/undertow/client/http
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -556,8 +556,10 @@ public void handleEvent(StreamSourceChannel channel) {
556
556
UndertowLogger .CLIENT_LOGGER .debugf (e , "Connection closed with IOException" );
557
557
}
558
558
try {
559
- currentRequest .setFailed (e );
560
- currentRequest = null ;
559
+ if (currentRequest != null ) {
560
+ currentRequest .setFailed (e );
561
+ currentRequest = null ;
562
+ }
561
563
pendingResponse = null ;
562
564
} finally {
563
565
safeClose (channel , HttpClientConnection .this );
@@ -575,8 +577,10 @@ public void handleEvent(StreamSourceChannel channel) {
575
577
channel .suspendReads ();
576
578
try {
577
579
// Cancel the current active request
578
- currentRequest .setFailed (new IOException (MESSAGES .connectionClosed ()));
579
- currentRequest = null ;
580
+ if (currentRequest != null ) {
581
+ currentRequest .setFailed (new IOException (MESSAGES .connectionClosed ()));
582
+ currentRequest = null ;
583
+ }
580
584
pendingResponse = null ;
581
585
} finally {
582
586
safeClose (HttpClientConnection .this );
You can’t perform that action at this time.
0 commit comments