Commit 351b2ea7 authored by Neil Fuller's avatar Neil Fuller
Browse files

Fixes to ConnectionPool noticed during upstream review

Suggested by Jake Wharton. Minor documentation fixes, plus:

The pool should explicitly re-enter DRAINING state if a
connection is added to a drained pool. This state change was
missing.

The pool was implicitly in DRAINING while the pool still had
connections in it, so the pool would still drain.
However, adding back connections to a pool that was DRAINING
but still incorrectly marked as DRAINED would cause a
new runnable to be scheduled. This would cause the queue of
scheduled items to grow unnecesarily and the clean up thread
would continue to operate longer than necessary.

Bug: 18369687
(cherry picked from commit 6257f0c1)

Change-Id: Id60486a70163679d4f587ea75b71fc438a1d8df0
parent 442180cd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment