further safety
This commit is contained in:
parent
e19ed416bb
commit
c21858c48c
@ -106,11 +106,12 @@
|
|||||||
timingOutIn: timeout) { (receivedParameter) in
|
timingOutIn: timeout) { (receivedParameter) in
|
||||||
// Queue the results for merge.
|
// Queue the results for merge.
|
||||||
self.parametersWorkQueue.async {
|
self.parametersWorkQueue.async {
|
||||||
|
let previouslySatisfied = returnedList.allSatisfy { $0 != nil }
|
||||||
if (returnedList[index] != nil) {
|
if (returnedList[index] != nil) {
|
||||||
MVMCoreLoggingHandler.shared()?.addError(toLog: MVMCoreErrorObject(title: nil, message: "Client parameter \(parameterType) has already executed. The completion handler should only be called once!", code: ErrorCode.default.rawValue, domain: ErrorDomainNative, location: String(describing: ClientParameterHandler.self))!)
|
MVMCoreLoggingHandler.shared()?.addError(toLog: MVMCoreErrorObject(title: nil, message: "Client parameter \(parameterType) has already executed. The completion handler should only be called once!", code: ErrorCode.default.rawValue, domain: ErrorDomainNative, location: String(describing: ClientParameterHandler.self))!)
|
||||||
}
|
}
|
||||||
returnedList[index] = receivedParameter
|
returnedList[index] = receivedParameter
|
||||||
if (returnedList.allSatisfy { $0 != nil }) {
|
if (!previouslySatisfied && returnedList.allSatisfy { $0 != nil }) {
|
||||||
self.group.leave() // Leaving is only done after setup (barriered).
|
self.group.leave() // Leaving is only done after setup (barriered).
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user