> It seems that even closed connections are being put back
> into the pool for the host to which they were opened.

I got it. When being allocated, the connection was counted
for the "connections per host" limit. When it is released,
some other thread waiting for a connection to that host can
be unblocked. We need to remember the host configuration
for which the connection was allocated to uncount it when
it gets released.

> In my first attempt, I delete the HostConfiguration when
> the connection gets closed. The result is a SEVERE error
> message when the connection is released. I would have
> expected the closed or unassigned connections to just
> end up in the non-specific list of free connections.

I guess there is not even an unspecific list? Connections
are kept in two lists simultaneously, one is always host
specific while the other one keeps all connections in the
pool. Currently, connections are never re-assigned to a
different host, but instead they are deleted and a new
connection is created for the new host.

I was a bit confused that HttpMethodDirector updates a
HostConfiguration when following redirects, but that is
not the HostConfiguration stored in the connection.

cheers,
  Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to