|
|
|
@ -64,7 +64,7 @@ type clientState struct {
|
|
|
|
type NetworkState struct {
|
|
|
|
type NetworkState struct {
|
|
|
|
State ipn.State
|
|
|
|
State ipn.State
|
|
|
|
NetworkMap *controlclient.NetworkMap
|
|
|
|
NetworkMap *controlclient.NetworkMap
|
|
|
|
HasInternet bool
|
|
|
|
LostInternet bool
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// UIEvent is an event flowing from the UI to the backend.
|
|
|
|
// UIEvent is an event flowing from the UI to the backend.
|
|
|
|
@ -257,7 +257,7 @@ func (a *App) runBackend() error {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case <-onConnectivityChange:
|
|
|
|
case <-onConnectivityChange:
|
|
|
|
state.HasInternet = connected.Load().(bool)
|
|
|
|
state.LostInternet = !connected.Load().(bool)
|
|
|
|
if b != nil {
|
|
|
|
if b != nil {
|
|
|
|
b.LinkChange()
|
|
|
|
b.LinkChange()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|