Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[self.connection cancel] cancel other connections? #18

Open
knutigro opened this issue Sep 25, 2013 · 1 comment
Open

[self.connection cancel] cancel other connections? #18

knutigro opened this issue Sep 25, 2013 · 1 comment

Comments

@knutigro
Copy link

Hi I experience some problems with [self.connection cancel] in the dealloc method. I have a feeling it sometimes also cancel other ongoing request in the queue. Is this possible ? I have experimented both with and without FSN_QUEUED_CONNECTIONS.

- (void)dealloc {

    NSAssert(!self.connection, @"non-nil connection: %@", self.connection);

#if TARGET_OS_IPHONE
    // if this task was set to run in background then the expiration handler should be retaining self
    NSAssert1(self.taskIdentifier == UIBackgroundTaskInvalid,
              @"deallocated request has background task identifier: %@", self);
#endif


    [self clearBlocks]; // not cleanup; assert no taskIdentifer above instead

    // just to be safe in production
    FSNVerbose(@"%p: dealloc", self);

    [self.connection cancel];
}
@gwk
Copy link
Contributor

gwk commented Oct 4, 2013

I do not see how this would be possible. Please let me know if you find evidence to the contrary!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants