You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Gary Gregory <ga...@gmail.com> on 2018/11/18 21:08:20 UTC
Re: httpcomponents-core git commit: Refactored output control in the
async HTTP/1.1 protocol handlers [Forced Update!]
How come this commit is not at the top of
https://git-wip-us.apache.org/repos/asf?p=httpcomponents-core.git;a=summary
?
Gary
On Sun, Nov 18, 2018 at 1:51 PM <ol...@apache.org> wrote:
> Repository: httpcomponents-core
> Updated Branches:
> refs/heads/master 6a5eba5e5 -> 5da54d838 (forced update)
>
>
> Refactored output control in the async HTTP/1.1 protocol handlers
>
>
> Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
> Commit:
> http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/5da54d83
> Tree:
> http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/5da54d83
> Diff:
> http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/5da54d83
>
> Branch: refs/heads/master
> Commit: 5da54d83856b8cc555f5c67eb4233ad3f78033da
> Parents: 93f6131
> Author: Oleg Kalnichevski <ol...@apache.org>
> Authored: Sun Nov 18 21:51:32 2018 +0100
> Committer: Oleg Kalnichevski <ol...@apache.org>
> Committed: Sun Nov 18 21:51:32 2018 +0100
>
> ----------------------------------------------------------------------
> .../impl/nio/AbstractHttp1StreamDuplexer.java | 27 ++++++++------------
> 1 file changed, 10 insertions(+), 17 deletions(-)
> ----------------------------------------------------------------------
>
>
>
> http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/5da54d83/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/AbstractHttp1StreamDuplexer.java
> ----------------------------------------------------------------------
> 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 1ee2333..8e6c189 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
> @@ -374,29 +374,22 @@ abstract class
> AbstractHttp1StreamDuplexer<IncomingMessage extends HttpMessage,
> outputLock.unlock();
> }
> if (connState.compareTo(ConnectionState.SHUTDOWN) < 0) {
> - if (isOutputReady()) {
> - produceOutput();
> - } else {
> - final int pendingOutputRequests = outputRequests.get();
> - outputLock.lock();
> - try {
> - if (!outbuf.hasData() &&
> outputRequests.compareAndSet(pendingOutputRequests, 0)) {
> - ioSession.clearEvent(SelectionKey.OP_WRITE);
> - } else {
> - outputRequests.addAndGet(-pendingOutputRequests);
> - }
> - } finally {
> - outputLock.unlock();
> - }
> - }
> -
> - outputLock.lock();
> + produceOutput();
> + final int pendingOutputRequests = outputRequests.get();
> + final boolean outputPending = isOutputReady();
> final boolean outputEnd;
> + outputLock.lock();
> try {
> + if (!outputPending && !outbuf.hasData() &&
> outputRequests.compareAndSet(pendingOutputRequests, 0)) {
> + ioSession.clearEvent(SelectionKey.OP_WRITE);
> + } else {
> + outputRequests.addAndGet(-pendingOutputRequests);
> + }
> outputEnd = outgoingMessage == null && !outbuf.hasData();
> } finally {
> outputLock.unlock();
> }
> +
> if (outputEnd) {
> outputEnd();
> if (connState.compareTo(ConnectionState.ACTIVE) == 0) {
>
>
Re: httpcomponents-core git commit: Refactored output control in
the async HTTP/1.1 protocol handlers [Forced Update!]
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Sun, 2018-11-18 at 14:08 -0700, Gary Gregory wrote:
> How come this commit is not at the top of
>
https://git-wip-us.apache.org/repos/asf?p=httpcomponents-core.git;a=summary
> ?
>
I removed it.
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org