Skip to content

Commit

Permalink
fix: Demo app compilation issues
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrizio Demaria <[email protected]>
  • Loading branch information
fabriziodemaria committed Feb 7, 2025
1 parent 975f02c commit 7e2b7c3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/ConfidenceProvider/ConfidenceFeatureProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class ConfidenceFeatureProvider: FeatureProvider {
public var hooks: [any Hook] = []
private let lock = UnfairLock()
private let initializationStrategy: InitializationStrategy
private let eventHandler = EventHandler(ProviderEvent.notReady)
private let eventHandler = EventHandler()
private let confidence: Confidence
private let confidenceFeatureProviderQueue = DispatchQueue(label: "com.provider.queue")
private var cancellables = Set<AnyCancellable>()
Expand Down Expand Up @@ -55,12 +55,12 @@ public class ConfidenceFeatureProvider: FeatureProvider {
try await confidence.fetchAndActivate()
eventHandler.send(.ready)
} catch {
eventHandler.send(.error)
eventHandler.send(.error(errorCode: .general, message: error.localizedDescription))
}
}
}
} catch {
eventHandler.send(.error)
eventHandler.send(.error(errorCode: .general, message: error.localizedDescription))
}
}

Expand Down Expand Up @@ -115,7 +115,7 @@ public class ConfidenceFeatureProvider: FeatureProvider {
try confidence.getEvaluation(key: key, defaultValue: defaultValue).toProviderEvaluation()
}

public func observe() -> AnyPublisher<OpenFeature.ProviderEvent, Never> {
public func observe() -> AnyPublisher<OpenFeature.ProviderEvent?, Never> {
return eventHandler.observe()
}

Expand Down

0 comments on commit 7e2b7c3

Please sign in to comment.