Update captive portal detection to work without server

This commit is contained in:
Daniel
2020-07-21 14:56:06 +02:00
parent b87ba37d4c
commit 811516eec8
4 changed files with 128 additions and 148 deletions

View File

@@ -15,11 +15,15 @@ var (
)
func init() {
module = modules.Register("netenv", nil, start, nil)
module = modules.Register("netenv", prep, start, nil)
module.RegisterEvent(NetworkChangedEvent)
module.RegisterEvent(OnlineStatusChangedEvent)
}
func prep() error {
return prepOnlineStatus()
}
func start() error {
module.StartServiceWorker(
"monitor network changes",