-
Notifications
You must be signed in to change notification settings - Fork 199
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
fix(api): storing cancelablles with actor methods in AppSyncRTC #3824
Conversation
API Breakage Report✅ No Public API Breaking Change detected |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3824 +/- ##
==========================================
- Coverage 68.62% 68.37% -0.25%
==========================================
Files 1080 1082 +2
Lines 37635 37731 +96
==========================================
- Hits 25827 25800 -27
- Misses 11808 11931 +123
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
API Breakage Report✅ No Public API Breaking Change detected |
@@ -425,24 +430,37 @@ extension AppSyncRealTimeClient { | |||
} | |||
} | |||
|
|||
private func monitorHeartBeats(_ connectionAck: JSONValue?) { | |||
internal func monitorHeartBeats(_ connectionAck: JSONValue?) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can probably omit internal
as that is the default when no access level is specified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, will remove the modifier!
Issue #
#3748
Description
The potential crash is caused by the non thread-safe
AnyCancellable.store(in:)
API. This PR ensures that all cancellable properties are accessed within an isolated actor context.General Checklist
Given When Then
inline code documentation and are named accordinglytestThing_condition_expectation()
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.