Skip to content

Commit aab3575

Browse files
committed
fix OcaDeviceProperty setter: send value synchronously, notify subscribers asynchronously
1 parent 4d7b87f commit aab3575

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/SwiftOCADevice/OCC/PropertyTypes/DeviceProperty.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,10 @@ public struct OcaDeviceProperty<Value: Codable & Sendable>: OcaDevicePropertyRep
273273
}
274274
set {
275275
let property = object[keyPath: storageKeyPath]
276+
property.subject.send(newValue)
276277

277278
Task {
278-
await property.setAndNotifySubscribers(object: object, newValue)
279+
try? await property.notifySubscribers(object: object, newValue)
279280
}
280281
}
281282
}

0 commit comments

Comments
 (0)