toastdriven/pysolr — pull request #38 by jt6211 (2012-01-04 22:30:58+00:00)
Title: Added code to reuse the Http connection when using httplib2.Http object

I was running into problems with an app that made thousands of Solr queries. Many sockets were being openned, used once and then left open. This ended up causing: "[Errno 99] Cannot assign requested address".

if I ran this code, I was able to confirm this behavior using netstat (netstat -ptn | wc -l).

```python
import pysolr
conn = pysolr.Solr(url)
while True:
res = conn.search(query)
```
After my changes, running the same code and netstat showed that only a fixed number of sockets were being created and the Exception mentioned above did not occur.