Add pause support

This commit is contained in:
世界 2023-08-07 20:57:31 +08:00
parent b4db0692d3
commit 7be452de15
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
4 changed files with 18 additions and 7 deletions

View file

@ -39,6 +39,9 @@ func (peer *Peer) NewTimer(expirationFunction func(*Peer)) *Timer {
timer.isPending = false
timer.modifyingLock.Unlock()
if pauseManager := peer.device.pauseManager; pauseManager != nil {
pauseManager.WaitActive()
}
expirationFunction(peer)
})
timer.Stop()