Something like...

<cfset success = "">
<cfset attempts = 0>
<cfloop condition="success is not 1 and attempts lt 4">
   <cfset attempts = attempts + 1>
   <cftry>
      <cfhttp ... timeout="60" ... >
      <cfset success = 1>
      <cfcatch>
         <cfset success = 0>
      </cfcatch>
   </cftry>
</cfloop>

On Thu, Nov 18, 2010 at 12:38 PM, Casey Dougall <
ca...@uberwebsitesolutions.com> wrote:

>
> Hi,
>
> I have a cfhttp call in a cfc that from time to time receives a connection
> timeout. I'd like to just retry the call again, but not sure of best way to
> start the call over. I actually don't want to start the whole thing over,
> just re-try the cfhttp call if it receives a connection timeout.
>
> Maybe a cfloop 2 or 3 times? But I don't want it to loop right away, only
> if
> it received a timeout.
>
> Thoughts?
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339359
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to