-
Notifications
You must be signed in to change notification settings - Fork 918
Enable idle connection reaper for Apache client #754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
} | ||
public boolean registerConnectionManager(HttpClientConnectionManager manager, long maxIdleTime) { | ||
boolean notPreviouslyRegistered = connectionManagers.put(manager, maxIdleTime) == null; | ||
if (notPreviouslyRegistered) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need the check of not previously registered since we are checking if the exec is null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, don't think it's necessary.
shutdown(); | ||
public boolean deregisterConnectionManager(HttpClientConnectionManager manager) { | ||
boolean wasRemoved = connectionManagers.remove(manager) != null; | ||
if (wasRemoved) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't follow this. Shouldn't we only shutdown if all connection managers are de-registered?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woops! Yeah should be an empty check
@Override | ||
public void run() { | ||
while (true) { | ||
if (stopping) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just put this in the while? while(!stopping)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
6948203
to
88db521
Compare
…ef632f8f Pull request: release <- staging/2b200b34-8d28-42cb-b359-a073ef632f8f
Description
Motivation and Context
Testing
Added new tests.
Screenshots (if appropriate)
Types of changes
Checklist
mvn install
succeedsLicense