Add websocket wifi updates
This commit is contained in:
parent
c443fce24f
commit
1477d909b0
11 changed files with 755 additions and 10 deletions
|
|
@ -53,6 +53,12 @@ func (a *App) Initialize(cfg *config.Config) error {
|
|||
return err
|
||||
}
|
||||
|
||||
// Start WiFi event monitoring
|
||||
if err := wifi.StartEventMonitoring(); err != nil {
|
||||
log.Printf("Warning: WiFi event monitoring failed: %v", err)
|
||||
// Don't fail - polling fallback still works
|
||||
}
|
||||
|
||||
// Start periodic tasks
|
||||
go a.periodicStatusUpdate()
|
||||
go a.periodicDeviceUpdate()
|
||||
|
|
@ -71,6 +77,7 @@ func (a *App) Run(addr string) error {
|
|||
|
||||
// Shutdown gracefully shuts down the application
|
||||
func (a *App) Shutdown() {
|
||||
wifi.StopEventMonitoring()
|
||||
wifi.Close()
|
||||
logging.AddLog("Système", "Application arrêtée")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue