Skip to content

Commit

Permalink
health: don't look for UDP goroutines in js/wasm health check
Browse files Browse the repository at this point in the history
Updates #3157

Change-Id: I43d97e6876eeb2d1936fc567835134568bb8615c
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
  • Loading branch information
bradfitz committed Oct 22, 2021
1 parent ed3fb19 commit 09e692e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions health/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"errors"
"fmt"
"os"
"runtime"
"sort"
"sync"
"sync/atomic"
Expand Down Expand Up @@ -347,6 +348,12 @@ var (
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.
Expand Down

0 comments on commit 09e692e

Please sign in to comment.