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

[iOS]RCTHTTPRequestHandler thread issue #8835

Closed
wenpkpk opened this issue Jul 16, 2016 · 2 comments
Closed

[iOS]RCTHTTPRequestHandler thread issue #8835

wenpkpk opened this issue Jul 16, 2016 · 2 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@wenpkpk
Copy link

wenpkpk commented Jul 16, 2016

  • (void)cancelRequest:(NSURLSessionDataTask *)task
    {
    [task cancel];
    [_delegates removeObjectForKey:task];
    }

_delegates is not thread-safe, it crashed in my app.

@RD1991
Copy link

RD1991 commented Jul 17, 2016

Can you just confirm the method , if it exists or not on the delegate ? like,

  • (void)cancelRequest:(NSURLSessionDataTask *)task
    {
    [task cancel];
    if([delegate respondsToSelector:@selector(removeObjectForKey:)])
    [_delegates removeObjectForKey:task];
    }

@mkonicek
Copy link
Contributor

Hi there! This issue is being closed because it has been inactive for a while.

But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/iosrcthttprequesthandler-thread-issue

Product Pains has been very useful in highlighting the top bugs and feature requests:
https://productpains.com/product/react-native?tab=top

Also, if this issue is a bug, please consider sending a pull request with a fix.

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants