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.
That is correct.
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.
It does keep a list of freeConnections (for the purpose of deleting a least recently used connection). This only occurs when the host limit _has not_ been reached, the total allocated connection limit _has_ been reached, and there are free connections. As you say though a connection is never switched between hosts, it is just deleted and a new one is created.
I was a bit confused that HttpMethodDirector updates a HostConfiguration when following redirects, but that is not the HostConfiguration stored in the connection.
Yes, this is one of the strange "features" of the connection manager. The current limits on connections per host (route really) are only enforced at checkout time. Once a connection is outside of the connection manager it can be reused for other hosts. Mike --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
