You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2024/10/18 07:01:18 UTC

(httpcomponents-core) 02/02: 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

This is an automated email from the ASF dual-hosted git repository.

olegk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git

commit e50f42a4efa15531e6d9edef2d2ace2e0669f1d9
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Thu Oct 17 19:40:03 2024 +0200

    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
---
 .../org/apache/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 717022a12..8dfba165b 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 @@ abstract class AbstractHttp1StreamDuplexer<IncomingMessage extends HttpMessage,
 
     @Override
     public boolean isOpen() {
-        return connState == ConnectionState.ACTIVE;
+        return connState.compareTo(ConnectionState.ACTIVE) <= 0;
     }
 
     @Override