mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-28 22:27:14 +02:00
Fix race condition with chapter sleep timer
This commit is contained in:
@@ -27,8 +27,8 @@ extension AudioPlayer {
|
|||||||
sleepTimeRemaining = self.sleepTimeRemaining
|
sleepTimeRemaining = self.sleepTimeRemaining
|
||||||
}
|
}
|
||||||
|
|
||||||
// Guard against invalid sleep timers
|
// Guard against invalid sleep timers, but give it a chance to go 1 second negative to prevent a raise condition
|
||||||
if sleepTimeRemaining?.isLess(than: 0) ?? false {
|
if sleepTimeRemaining?.isLess(than: -1) ?? false {
|
||||||
self.removeSleepTimer()
|
self.removeSleepTimer()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user