[prev in list] [next in list] [prev in thread] [next in thread]
List: httpcomponents-commits
Subject: [httpcomponents-core] branch 5.0.x updated: Calculate pendingOutputRequests before calling produceOu
From: olegk () apache ! org
Date: 2020-09-28 12:32:25
Message-ID: 160129634563.12456.18048373144204822304 () gitbox ! apache ! org
[Download RAW message or body]
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch 5.0.x
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git
The following commit(s) were added to refs/heads/5.0.x by this push:
new 1dd57a3 Calculate pendingOutputRequests before calling produceOutput to \
avoid race condition 1dd57a3 is described below
commit 1dd57a3521abbbaa186ac16de2908aeb838b3412
Author: ColinWeld <c_weld@backblaze.com>
AuthorDate: Thu Sep 24 17:25:16 2020 -0700
Calculate pendingOutputRequests before calling produceOutput to avoid race \
condition
---
.../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 1fcfe5e..d8b27d6 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
@@ -346,8 +346,8 @@ abstract class AbstractHttp1StreamDuplexer<IncomingMessage \
extends HttpMessage, ioSession.getLock().unlock();
}
if (connState.compareTo(ConnectionState.SHUTDOWN) < 0) {
- produceOutput();
final int pendingOutputRequests = outputRequests.get();
+ produceOutput();
final boolean outputPending = isOutputReady();
final boolean outputEnd;
ioSession.getLock().lock();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic