hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Quintin Beukes" <quin...@last.za.net>
Subject Re: isStale()
Date Fri, 20 Jun 2008 23:44:34 GMT
Will NIO connections work?

On 6/21/08, Quintin Beukes <quintin@last.za.net> wrote:
>
> 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 <olegk@apache.org> 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: httpclient-users-unsubscribe@hc.apache.org
>> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>>
>>
>
>
> --
> Quintin Beukes




-- 
Quintin Beukes

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message