Hey,

So.. keepalive is sort of useless then? Because I realised what my problem
is. It wasn't synchronization. It was because connections closed by the
server, and then it fails when I try to re-use the connection.

Basically what I have is this:
I try once, if receiving a NoResponse exception, I remove it from the pool
and try again
If second try fails as well, it gets removed and I try again but with an
isStale() check first.

My problem is that these keep failing until I filtered through all
connections in the pool. In which case I start making new ones.

How does HttpClient handle this? Or what can I do to improve this into being
more reliable (in the sense of reducing failures to a minimum).

Q

On 6/21/08, Oleg Kalnichevski <[EMAIL PROTECTED]> wrote:
>
> Quintin Beukes wrote:
>
>> Hey,
>>
>> Isn't isStale() supposed to be able to tell me whether the server is
>> accepting responses?
>>
>>
> No, it is intended to test if the connection is still valid on the client
> side. Blocking I/O provides no good means of telling if the socket has been
> closed by the peer. #isStale is a work-around for the problem.
>
> Oleg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Quintin Beukes

Reply via email to