CFURL: A Block Too Far
CFURL: A Block Too Far
- Subject: CFURL: A Block Too Far
- From: Andy O'Meara <email@hidden>
- Date: Fri, 6 Aug 2010 12:37:10 -0500
Heya folks.. One of the CF net gurus here may be be able to help with a CFURL issue I'm battling...
I'm using CFURLCreateDataAndPropertiesFromResource() load a vanilla http item. Problem is that if the network is down the proc just blocks and blocks without timing out--here's the stack:
#0 0x98aa00fa in mach_msg_trap
#1 0x98aa0867 in mach_msg
#2 0x923d1faf in __CFRunLoopRun
#3 0x923d1094 in CFRunLoopRunSpecific
#4 0x923d0ec1 in CFRunLoopRunInMode
#5 0x9370b0ad in HTTPNetStreamInfo::streamRead
#6 0x923ddc6c in CFReadStreamRead
#7 0x9370aef0 in HTTPReadStream::streamRead
#8 0x923ddc6c in CFReadStreamRead
#9 0x9374c21b in _CFHTTPMessageSendRequest
#10 0x9374caea in _CFURLCreateDataAndPropertiesFromResource
#11 0x923c2c0e in CFURLCreateDataAndPropertiesFromResource
So is there any way to set a timeout period on this operation? Or, alternatively, is there a way to set up an abort signal of some kind? Or should I be using a different API to load http items if I want a timeout or an abort signal. I would expect one of the two to be available somehow, or else anyone that ever uses this proc risks an unavoidable app hang if the network is down. Ouch. Or maybe I should be filing a radar on this??
Naturally, the higher-level the solution, the better -- no sense in re-inventing a http get. Also, we'd like to avoid Cocoa for a number of reasons.
Thanks in advance!
Andy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden