You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/MutationSync/OutgoingMutationQueue/OutgoingMutationQueue.swift
+10-6
Original file line number
Diff line number
Diff line change
@@ -70,9 +70,8 @@ final class OutgoingMutationQueue: OutgoingMutationQueueBehavior {
70
70
self.stateMachineSink =self.stateMachine
71
71
.$state
72
72
.sink{[weak self] newState in
73
-
guardlet self =selfelse{
74
-
return
75
-
}
73
+
guardlet self else{return}
74
+
76
75
self.log.verbose("New state: \(newState)")
77
76
self.mutationDispatchQueue.async{
78
77
self.respond(to: newState)
@@ -138,7 +137,9 @@ final class OutgoingMutationQueue: OutgoingMutationQueueBehavior {
138
137
self.api = api
139
138
self.reconciliationQueue = reconciliationQueue
140
139
141
-
queryMutationEventsFromStorage{
140
+
queryMutationEventsFromStorage{[weak self]in
141
+
guardlet self =selfelse{return}
142
+
142
143
self.operationQueue.isSuspended =false
143
144
// State machine notification to ".receivedSubscription" will be handled in `receive(subscription:)`
144
145
mutationEventPublisher.publisher.subscribe(self)
@@ -319,7 +320,8 @@ final class OutgoingMutationQueue: OutgoingMutationQueueBehavior {
0 commit comments