Re: Aborting an FTP Stream
Re: Aborting an FTP Stream
- Subject: Re: Aborting an FTP Stream
- From: Frederick Cheung <email@hidden>
- Date: Mon, 28 Feb 2005 17:57:06 +0000
On 28 Feb 2005, at 16:44, Wells, Terry C wrote:
Hi,
After taking a fresh look at it this morning, I noticed that the
cause of the crash was quite simple. The order of destruction when
the cancel button was clicked was causing the CFNetwork CFBundle to
get unloaded and all the function pointers NULLed out before the call
to unschedule the stream from the run loop. Oops. That's an easy
enough fix.
Now I can successfully unschedule, set client = 0, close the stream
and release the stream.
However, I'm still having a problem. Now it doesn't crash, but the
next thing that happens in my program is an FTP directory listing
which reloads the CFNetwork bundle, sets up another transfer, and
calls RunLoopRun again. On this call, something hangs internally and
no FTP transfer ever occurs, thus the runloop never exits and my whole
app is frozen.
How about not unloading/reloading the cfnetwork bundle all the time?
Given that the directory listing works correctly in the case that the
prior FTP transfer completes normally (ie. no cancel), I'm thinking
that something is getting hosed up in the cancel/abort case.
Sample/Shark may be useful to see where your program is getting stuck
exactly.
Fred
_______________________________________________
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