twitter/hbc — pull request #106 by bkhau (2014-04-07 21:22:06+00:00)
Title: Use a separate HttpClient for SitestreamController

In order to use sitestreams & controlstreams, we have to use separate connections for the processor and the controller. This seems consistent with what how sitestreams/controlstreams behaves on the command line.

I encountered this behavior while following the sitestream example in hbc-example.
Previously:
```scala
val asyncClient = new SitestreamClient(client, queue, service)
asyncClient.connect()
asyncClient.process()
val controller = asyncClient.createSitestreamController() // hbc-provided
...
// do stuff
val info = controller.getInfo(asyncClient.getStreamId) // hangs indefinitely
```

What worked:
```scala
val asyncClient = new SitestreamClient(client, queue, service)
asyncClient.connect()
asyncClient.process()
// use a separate http client for the control stream
val httpclient: HttpClient = new DefaultHttpClient(new PoolingClientConnectionManager)
val controller = new SitestreamController(httpclient, new HttpHosts(hosts), auth)
...
// do stuff
val info = controller.getInfo(asyncClient.getStreamId)
```