LibURL downloading and Mail.app in OS X
J. Landman Gay
jacque at hyperactivesw.com
Sat Jan 21 19:43:41 EST 2006
Trevor DeVore wrote:
> On Jan 21, 2006, at 12:03 PM, J. Landman Gay wrote:
>
>> I have a project that uses libURL to download files from a server.
>> One tester using OS X reports that if Mail.app is open and
>> synchronizing mail, libURL fails pretty consistently to download.
>> Apparently Mail.app doesn't play well with others, or else the Rev
>> engine or libURL has a glitch.
>>
>> I just thought I'd mention this as a datapoint in case others
>> experience the same thing. If anyone knows of a workaround, that'd be
>> great too. Right now my app just reports a failure and stops
>> downloading, but that's about all it can do.
>
>
> Jacque,
>
> What error does libURL report? Can you get around this by trying to
> download the url that caused the error again (trying a max of 3 times
> or so)? I ask because I have download over 1,000 files consecutively
> on an OS X machine with Mail running and I didn't notice any problems.
> I use
>
> load URL "myURL" with message "downloadComplete"
>
> and check for errors in downloadComplete. If a timeout (param 2 is
> "timeout") or an error occurred (param 2 is "error") and
> libURLErrorData() reports "socket closed before end of file", "error
> socket is open" or just "error" then I try to download the URL a max of
> 3 times. I've had excellent results with this method on both OS X and
> Windows.
>
>
I'm not checking specifically to see if there was a timeout or an error,
just whether it was successful or not. I suppose I should. The deal is,
we've got several testers all using OS X and it has worked flawlessly
for everyone but one. When he finally quit Mail, after testing with it
open for several days, he could download successfully.
During the failure period he would get perhaps 3-4 successful downloads
out of ten. After quitting Mail he was 100% successful and has been ever
since. Maybe it was a timeout.
I can add a re-try to my scripts. Mainly I wanted to alert people to
this experience. It might be that we haven't truly isolated the real
cause, but it seems like there's a correlation.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list