I am using the new apache http client and I'm seeing strange behavior. I am sending 50 messages to the server in rapid succession. Using the 'ethereal' tool, I examined the TCP traffic. What I saw was that occasionally the connection would get reused once, that is, two calls would occur before the connection was closed. In the other cases, I think 45, the connection was closed after the first call.
At the TCP level, the close is requested by the client. I had one theory that I couldn't confirm. I saw that com.noelios.restlet.ext.httpclient.HttpClientHelper in stop() calls closeIdleConnections() on the connection manager and it appears to me that call is not immediate but may take some time. I guessed that there might be a race between that call completing and my requests, so occasionally I won and sometime two calls got through. But I could not find anyplace where the stop() method would be called. Any ideas on what is going on and how I could get the connection to stay open? Regards, Sean

