Unbreak running without a captive portal configuration file

This commit is contained in:
Frank Denis 2020-08-04 00:50:59 +02:00
parent 5843e49188
commit 60d4c98f31
3 changed files with 7 additions and 3 deletions

View File

@ -14,7 +14,9 @@ func NetProbe(proxy *Proxy, address string, timeout int) error {
return nil return nil
} }
if captivePortalHandler, err := ColdStart(proxy); err == nil { if captivePortalHandler, err := ColdStart(proxy); err == nil {
if captivePortalHandler != nil {
defer captivePortalHandler.Stop() defer captivePortalHandler.Stop()
}
} else { } else {
dlog.Critical(err) dlog.Critical(err)
} }

View File

@ -12,7 +12,9 @@ func NetProbe(proxy *Proxy, address string, timeout int) error {
return nil return nil
} }
if captivePortalHandler, err := ColdStart(proxy); err == nil { if captivePortalHandler, err := ColdStart(proxy); err == nil {
if captivePortalHandler != nil {
defer captivePortalHandler.Stop() defer captivePortalHandler.Stop()
}
} else { } else {
dlog.Critical(err) dlog.Critical(err)
} }