diff --git a/Sources/RediStack/RedisConnection.swift b/Sources/RediStack/RedisConnection.swift index 4872fe3..f8fc002 100644 --- a/Sources/RediStack/RedisConnection.swift +++ b/Sources/RediStack/RedisConnection.swift @@ -129,7 +129,7 @@ public final class RedisConnection: RedisClient { internal let channel: Channel - private let autoflush = Atomic(value: true) + private let autoflush: NIOAtomic = .makeAtomic(value: true) private let _stateLock = Lock() private var _state = ConnectionState.open private var state: ConnectionState { diff --git a/Sources/RediStack/RedisMetrics.swift b/Sources/RediStack/RedisMetrics.swift index d8b386c..55bf723 100644 --- a/Sources/RediStack/RedisMetrics.swift +++ b/Sources/RediStack/RedisMetrics.swift @@ -59,7 +59,7 @@ public struct RedisMetrics { /// A specialized wrapper class for working with `Metrics.Gauge` objects for the purpose of an incrementing or decrementing count of active Redis connections. public class ActiveConnectionGauge { private let gauge = Gauge(label: .activeConnectionCount) - private let count = Atomic(value: 0) + private let count: NIOAtomic = .makeAtomic(value: 0) /// The number of the connections that are currently reported as active. var currentCount: Int { return count.load() }