Skip to content

Commit c5a5736

Browse files
Fix garbage collection sleep duration
Was incorrect for non-integer number of seconds. Mistake in 2167277.
1 parent cd56508 commit c5a5736

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/AblyLiveObjects/Internal/InternalDefaultRealtimeObjects.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ internal final class InternalDefaultRealtimeObjects: Sendable, LiveMapObjectPool
106106
do {
107107
while true {
108108
logger.log("Will perform garbage collection in \(garbageCollectionInterval)s", level: .debug)
109-
try await Task.sleep(nanoseconds: UInt64(garbageCollectionInterval) * NSEC_PER_SEC)
109+
try await Task.sleep(nanoseconds: UInt64(garbageCollectionInterval * Double(NSEC_PER_SEC)))
110110

111111
guard let self else {
112112
return

0 commit comments

Comments
 (0)