Maybe you could do something like this:

<cfhttp url="somURL" method="GET" result="results">

<cfif findNoCase("200", results.StatusCode)>
        continue to process
<cfelse>
        re-process
</cfif>

If you get a timeout, I believe the status code will not be 200 and
therefore you could try again.

HTH... Che

-----Original Message-----
From: Casey Dougall [mailto:ca...@uberwebsitesolutions.com] 
Sent: Thursday, November 18, 2010 1:39 PM
To: cf-talk
Subject: cfhttp connection timeout - best way to loop or re-try?


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:339358
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to