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

AWS subscriptions - subscribe function is not thread safe and causes crashes #568

Closed
Vanyaslav opened this issue Apr 13, 2023 · 1 comment
Labels
follow up Requires follow up from maintainers

Comments

@Vanyaslav
Copy link

Vanyaslav commented Apr 13, 2023

Describe the bug
When subscribing on multiple threads the connection pool is causing crashes since it accesses a dictionary inside the class IAMBasedConnectionPool which is not thread safe.

To Reproduce
Steps to reproduce the behavior:

  1. Create multiple subscribers with AWS App sync on multiple threads.
  2. Enjoy the crashing app.

Expected behavior
It should be a thread safe operation to avoid crashes.

Screenshots
Screenshot 2023-04-13 at 09 52 07
Screenshot 2023-04-13 at 10 02 37

Environment(please complete the following information):

  • AppSync SDK Version: [3.6.2]
  • Dependency Manager: [Cocoapods]
  • Swift Version : [5.0]

Device Information (please complete the following information):

  • Device: [Simulator]
  • iOS Version: [e.g. iOS 16.4]
  • Specific to simulators:

Additional context
We use the framework kinda extensively, but with iOS16.4 and AppSync v. 3.6.2 the problem has gone to really a bad situation, while before we had experienced the crash less frequently.
Already prepared a fix , gonna send a PR soon.

@atierian atierian added the follow up Requires follow up from maintainers label Dec 7, 2023
@atierian
Copy link
Member

atierian commented Dec 7, 2023

Resolved by #569

@atierian atierian closed this as completed Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
follow up Requires follow up from maintainers
Projects
None yet
Development

No branches or pull requests

2 participants