Return-Path: Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: (qmail 20835 invoked from network); 20 Jun 2008 23:45:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Jun 2008 23:45:05 -0000 Received: (qmail 22455 invoked by uid 500); 20 Jun 2008 23:45:06 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 22435 invoked by uid 500); 20 Jun 2008 23:45:06 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 22424 invoked by uid 99); 20 Jun 2008 23:45:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jun 2008 16:45:06 -0700 X-ASF-Spam-Status: No, hits=3.2 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.200.168] (HELO wf-out-1314.google.com) (209.85.200.168) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jun 2008 23:44:17 +0000 Received: by wf-out-1314.google.com with SMTP id 23so1397464wfg.10 for ; Fri, 20 Jun 2008 16:44:35 -0700 (PDT) Received: by 10.142.232.20 with SMTP id e20mr2019163wfh.134.1214005475003; Fri, 20 Jun 2008 16:44:35 -0700 (PDT) Received: by 10.142.131.13 with HTTP; Fri, 20 Jun 2008 16:44:34 -0700 (PDT) Message-ID: <1f3854d50806201644h7ad40e00h696edef49cd5e0c@mail.gmail.com> Date: Sat, 21 Jun 2008 01:44:34 +0200 From: "Quintin Beukes" Sender: quintin@skywalk.co.za To: "HttpClient User Discussion" Subject: Re: isStale() In-Reply-To: <1f3854d50806201633m3ed746c8v5b4454a22a6f99ad@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_8618_32705354.1214005474929" References: <1f3854d50806201607r7b7a96fax37704f8242340799@mail.gmail.com> <485C3B01.9070307@apache.org> <1f3854d50806201633m3ed746c8v5b4454a22a6f99ad@mail.gmail.com> X-Google-Sender-Auth: 7ac0410a17f23787 X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_8618_32705354.1214005474929 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Will NIO connections work? On 6/21/08, Quintin Beukes 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 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 ------=_Part_8618_32705354.1214005474929--