Skip to content

Conversation

matt-oakes
Copy link
Collaborator

This fixes the issue where multiple calls to isConnected.fetch would only resolve the final one on iOS. It would correctly resolve them on Android.

The fix was was keep a copy of all of the resolvers, not just the last one, in an NSSet. We can then call them all when the connection data comes back.

I have also added an e2e test case to test this behaviour. We need to wait for #14 to be merged in before this is ready to do. I'm opening a fancy new "draft" PR now so it's here.

Fixes #10.

@matt-oakes matt-oakes marked this pull request as ready for review February 18, 2019 13:02
@Salakar Salakar self-requested a review February 19, 2019 15:59
@Salakar Salakar self-assigned this Feb 19, 2019
Copy link
Collaborator

@Salakar Salakar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; I think the approach here is fine 👍

@matt-oakes matt-oakes merged commit afa0825 into master Feb 21, 2019
@matt-oakes matt-oakes deleted the fix-issue-10 branch February 21, 2019 08:53
react-native-community-bot pushed a commit that referenced this pull request Feb 21, 2019
## [1.2.1](v1.2.0...v1.2.1) (2019-02-21)

### Bug Fixes

* **iOS:** Ensure all calls to isConnected.fetch resolve ([#15](#15)) ([afa0825](afa0825)), closes [#10](#10)
@react-native-community-bot
Copy link
Collaborator

🎉 This PR is included in version 1.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple fetch request starts to not resolve or reject promise

3 participants