diff --git a/module-client/src/main/java/org/apache/http/impl/conn/AbstractPoolEntry.java b/module-client/src/main/java/org/apache/http/impl/conn/AbstractPoolEntry.java index d10491fbc..c71456643 100644 --- a/module-client/src/main/java/org/apache/http/impl/conn/AbstractPoolEntry.java +++ b/module-client/src/main/java/org/apache/http/impl/conn/AbstractPoolEntry.java @@ -69,16 +69,16 @@ import org.apache.http.conn.OperatedClientConnection; public abstract class AbstractPoolEntry { /** The underlying connection being pooled or used. */ - protected OperatedClientConnection connection; + protected volatile OperatedClientConnection connection; /** The route for which this entry gets allocated. */ //@@@ currently accessed from connection manager(s) as attribute //@@@ avoid that, derived classes should decide whether update is allowed //@@@ SCCM: yes, TSCCM: no - protected HttpRoute plannedRoute; + protected volatile HttpRoute plannedRoute; /** The tracked route, or null before tracking starts. */ - protected RouteTracker tracker; + protected volatile RouteTracker tracker; /** diff --git a/module-client/src/main/java/org/apache/http/impl/conn/AbstractPooledConnAdapter.java b/module-client/src/main/java/org/apache/http/impl/conn/AbstractPooledConnAdapter.java index a82cd4182..5b54be38f 100644 --- a/module-client/src/main/java/org/apache/http/impl/conn/AbstractPooledConnAdapter.java +++ b/module-client/src/main/java/org/apache/http/impl/conn/AbstractPooledConnAdapter.java @@ -63,7 +63,7 @@ import org.apache.http.conn.OperatedClientConnection; public abstract class AbstractPooledConnAdapter extends AbstractClientConnAdapter { /** The wrapped pool entry. */ - protected AbstractPoolEntry poolEntry; + protected volatile AbstractPoolEntry poolEntry; /**