Fix repeatedly aquire the inhibit lock

This commit is contained in:
wzshiming 2021-01-15 10:49:11 +08:00
parent 0232df5093
commit 4e17e58552

View File

@ -173,6 +173,9 @@ func (m *Manager) aquireInhibitLock() error {
if err != nil {
return err
}
if m.inhibitLock != 0 {
m.dbusCon.ReleaseInhibitLock(m.inhibitLock)
}
m.inhibitLock = lock
return nil
}