Download continues after user has cancelled it (Google Docs)

44 views
Skip to first unread message

john wilburrey

unread,
Aug 30, 2012, 8:47:07 AM8/30/12
to gdata-objec...@googlegroups.com
I initiate download using [fetcher beginFetchWithCompletionHandler:^] message.
When user has pressed button "Cancel" I use [service.fetcherService stopAllFetchers] message to stop download, but in spite of that download continues & fetcher calls back

Greg Robbins

unread,
Aug 30, 2012, 4:08:46 PM8/30/12
to gdata-objec...@googlegroups.com
Was the fetcher created by the service object?

What happens if the [fetcher stopFetching] method is invoked?

john wilburrey

unread,
Sep 3, 2012, 3:23:49 AM9/3/12
to gdata-objec...@googlegroups.com
The fetcher is created by invoking [GTMHTTPFetcher fetcherWithRequest:request].
When it's created by the service object - everything works as it should, a fetcher stops fetching after the stopAllFetchers method is invoked.
I've noticed that the same situation happens with upload - fetchers continue fetching and call back &  service continues firing delayed fetchers in spite of invocation of the stopAllFetchers method.

Greg Robbins

unread,
Sep 7, 2012, 9:49:28 PM9/7/12
to gdata-objec...@googlegroups.com
A fetcher service object can only stop the fetchers that the fetcher service object created. 

A fetcher created by the class method, [GTMHTTPFetcher fetcherWithRequest:request], will not be stoppable by any fetcher service object, only by its own stopFetching method.
Reply all
Reply to author
Forward
0 new messages