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

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

cakofony
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 <[hidden email]>
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 [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

cakofony
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 [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

cakofony
In reply to this post by cakofony
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 [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

cakofony
In reply to this post by cakofony
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 [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

cakofony
In reply to this post by cakofony
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 [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...