health: don't look for UDP goroutines in js/wasm health check
Updates
"errors"
"fmt"
"os"
+ "runtime"
"sort"
"sync"
"sync/atomic"
@@ -347,6 +348,12 @@ func overallErrorLocked() error {
receiveFuncs = []*ReceiveFuncStats{&ReceiveIPv4, &ReceiveIPv6, &ReceiveDERP}
)
+func init() {
+ if runtime.GOOS == "js" {
+ receiveFuncs = receiveFuncs[2:] // ignore IPv4 and IPv6
+ }
+}
+
// ReceiveFuncStats tracks the calls made to a wireguard-go receive func.
type ReceiveFuncStats struct {
// name is the name of the receive func.
