equal
deleted
inserted
replaced
136 |
136 |
137 synchronized HttpConnection getConnection(boolean secure, |
137 synchronized HttpConnection getConnection(boolean secure, |
138 InetSocketAddress addr, |
138 InetSocketAddress addr, |
139 InetSocketAddress proxy) { |
139 InetSocketAddress proxy) { |
140 if (stopped) return null; |
140 if (stopped) return null; |
|
141 // for plain (unsecure) proxy connection the destination address is irrelevant. |
|
142 addr = secure || proxy == null ? addr : null; |
141 CacheKey key = new CacheKey(addr, proxy); |
143 CacheKey key = new CacheKey(addr, proxy); |
142 HttpConnection c = secure ? findConnection(key, sslPool) |
144 HttpConnection c = secure ? findConnection(key, sslPool) |
143 : findConnection(key, plainPool); |
145 : findConnection(key, plainPool); |
144 //System.out.println ("getConnection returning: " + c); |
146 //System.out.println ("getConnection returning: " + c); |
145 return c; |
147 return c; |