From abc2f7f79df11a582b0e1e1ea308971ed86bb0e7 Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Thu, 17 Oct 2024 19:40:03 +0200 Subject: [PATCH] Bug fix: fixed the problem with the HTTP/1.1 async protocol handler incorrectly reporting its state as CLOSED immediately after its instantiation until #onConnect event has been triggered --- .../hc/core5/http/impl/nio/AbstractHttp1StreamDuplexer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractHttp1StreamDuplexer.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractHttp1StreamDuplexer.java index b5dfbdc75..b46de7b8c 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractHttp1StreamDuplexer.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractHttp1StreamDuplexer.java @@ -559,7 +559,7 @@ public void close(final CloseMode closeMode) { @Override public boolean isOpen() { - return connState == ConnectionState.ACTIVE; + return connState.compareTo(ConnectionState.ACTIVE) <= 0; } @Override