mirror of
https://github.com/luckfox-eng29/kvm.git
synced 2026-01-18 03:28:19 +01:00
chore: update logging
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -70,9 +71,15 @@ func updateDisplay() {
|
||||
}
|
||||
}
|
||||
|
||||
var displayInited = false
|
||||
var (
|
||||
displayInited = false
|
||||
displayUpdateLock = sync.Mutex{}
|
||||
)
|
||||
|
||||
func requestDisplayUpdate() {
|
||||
displayUpdateLock.Lock()
|
||||
defer displayUpdateLock.Unlock()
|
||||
|
||||
if !displayInited {
|
||||
displayLogger.Info().Msg("display not inited, skipping updates")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user