Skip to content

Commit cb5cd81

Browse files
committed
🐛 Fix: Remove JVM-only @volatile annotation from commonMain
@volatile is also JVM-specific and not available in Kotlin common code.
1 parent 7b3257f commit cb5cd81

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

common/src/commonMain/kotlin/com/qrshield/security/RateLimiter.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,8 @@ class Throttler(
270270
private val clock: () -> Long = { Clock.System.now().toEpochMilliseconds() }
271271
) {
272272

273-
@Volatile
273+
// Note: For thread-safe access, use the suspend variants with Mutex
274+
// The non-suspend methods are for single-threaded UI access
274275
private var lastOperationTime: Long = 0L
275276

276277
private val mutex = Mutex()

0 commit comments

Comments
 (0)