CFReadStream Error -1
CFReadStream Error -1
- Subject: CFReadStream Error -1
- From: Daniel Jalkut <email@hidden>
- Date: Fri, 20 Jan 2006 19:39:47 -0500
I have periodically received mysterious bug reports from users of my
CFNetwork-based upload utility, that an error dialog conveying error
"-1" is presented to them midway through an upload, and the upload
fails.
I have determined that when this dialog is displayed,
CFReadStreamGetError has returned to my application an error "-1"
with domain = 0. Does this ring a bell for anybody? I can't find any
documentation that would lead me to believe this is a valid result.
(Yes, CFReadStreamGetStatus() does return kCFStreamStatusError before
I ask for the error).
Perhaps coincidentally, I have been able to artificially reproduce
such an error by interrupting the application's execution with a
debugger and allowing it to sit in the debugger for some time
(perhaps the 75 second timeout time?). When I continue, my (polling
based) CFNetwork code detects an error and aborts the transfer. I'm
not surprised that the transfer fails in this circumstance, but it
bothers me that the failure is so non-descript and happens to match
the mysterious error code some customers are seeing.
Do you suppose this is getting propagated back up from a deep select
() call in CoreFoundation?
I'm hesitant to just assume that "0,-1" means "network time out" or
some such. But I have customers who have experienced non-descript
errors (without breaking in the debugger to suspend execution) where
the application displays the "-1" error code.
At a minimum I'd like to be able to give this "suspended timeout"
error case a better explanation so I can differentiate it from any
other mysterious -1 errors that might be popping up for my customers.
Any advice on how I should proceed? Are there lower-level errno
values I should be testing in this scenario?
Thanks,
Daniel
_______________________________________________
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