From 8efc306e4fb1b225980a0b9909bcac60b8a152db Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 20 Oct 2021 12:13:52 -0700 Subject: [PATCH] net/interfaces: assume the network's up on js/wasm Updates #3157 Change-Id: If4acd33598ad5e8ef7fb5960964c9ac32bc8f68b Signed-off-by: Brad Fitzpatrick --- net/interfaces/interfaces.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/interfaces/interfaces.go b/net/interfaces/interfaces.go index c8323318b..1de76a15f 100644 --- a/net/interfaces/interfaces.go +++ b/net/interfaces/interfaces.go @@ -414,6 +414,9 @@ func (s *State) HasPAC() bool { return s != nil && s.PAC != "" } // AnyInterfaceUp reports whether any interface seems like it has Internet access. func (s *State) AnyInterfaceUp() bool { + if runtime.GOOS == "js" { + return true + } return s != nil && (s.HaveV4 || s.HaveV6) }