Update captive portal detection to work without server
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user