You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by cakofony <gi...@git.apache.org> on 2017/08/09 15:30:50 UTC

[GitHub] httpcomponents-client pull request #82: Fixed NPE PoolingAsyncClientConnecti...

GitHub user cakofony opened a pull request:

    https://github.com/apache/httpcomponents-client/pull/82

    Fixed NPE PoolingAsyncClientConnectionManager

    PoolingAsyncClientConnectionManager.validateAfterInactivity causes
    an NPE when PoolEntries are initially created with no Connection.
    
    Added logic to avoid checking the connection on every pool
    checkout similar to the blocking pool.
    
    Added an connection.isOpen check to http1.x connections leased
    from the pool, although I'm unsure if it's at all effective.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cakofony/httpcomponents-client async_conpool_npe

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/httpcomponents-client/pull/82.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #82
    
----
commit e22748f171ea55aa1c6343e763f797f69e720983
Author: Carter Kozak <c4...@gmail.com>
Date:   2017-08-09T15:27:28Z

    Fixed NPE PoolingAsyncClientConnectionManager
    
    PoolingAsyncClientConnectionManager.validateAfterInactivity causes
    an NPE when PoolEntries are initially created with no Connection.
    
    Added logic to avoid checking the connection on every pool
    checkout similar to the blocking pool.
    
    Added an connection.isOpen check to http1.x connections leased
    from the pool, although I'm unsure if it's at all effective.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] httpcomponents-client pull request #82: Fixed NPE PoolingAsyncClientConnecti...

Posted by ok2c <gi...@git.apache.org>.
Github user ok2c commented on a diff in the pull request:

    https://github.com/apache/httpcomponents-client/pull/82#discussion_r132268912
  
    --- Diff: httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/PoolingAsyncClientConnectionManager.java ---
    @@ -183,6 +184,12 @@ public void execute(final Boolean result) {
     
                                     })));
                                 } else {
    +                                if (!connection.isOpen()) {
    --- End diff --
    
    The stale connection check (as an attempt to read from the socket) is only applicable to blocking connections.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] httpcomponents-client issue #82: Fixed NPE PoolingAsyncClientConnectionManag...

Posted by ok2c <gi...@git.apache.org>.
Github user ok2c commented on the issue:

    https://github.com/apache/httpcomponents-client/pull/82
  
    Please review and close.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] httpcomponents-client pull request #82: Fixed NPE PoolingAsyncClientConnecti...

Posted by cakofony <gi...@git.apache.org>.
Github user cakofony commented on a diff in the pull request:

    https://github.com/apache/httpcomponents-client/pull/82#discussion_r132220250
  
    --- Diff: httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/PoolingAsyncClientConnectionManager.java ---
    @@ -183,6 +184,12 @@ public void execute(final Boolean result) {
     
                                     })));
                                 } else {
    +                                if (!connection.isOpen()) {
    --- End diff --
    
    This seems to be half the implementation of the blocking connection `isStale()` check


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] httpcomponents-client pull request #82: Fixed NPE PoolingAsyncClientConnecti...

Posted by cakofony <gi...@git.apache.org>.
Github user cakofony closed the pull request at:

    https://github.com/apache/httpcomponents-client/pull/82


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org