wgengine/magicsock: fix js/wasm crash regression loading non-existent portmapper
Thanks for the report, @Need-an-AwP! Fixes #17681 Updates #9394 Change-Id: I2e0b722ef9b460bd7e79499192d1a315504ca84c Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
0a5ba8280f
commit
edb11e0e60
@@ -13,6 +13,12 @@ var ErrUnavailable = errors.New("feature not included in this build")
|
||||
|
||||
var in = map[string]bool{}
|
||||
|
||||
// Registered reports the set of registered features.
|
||||
//
|
||||
// The returned map should not be modified by the caller,
|
||||
// not accessed concurrently with calls to Register.
|
||||
func Registered() map[string]bool { return in }
|
||||
|
||||
// Register notes that the named feature is linked into the binary.
|
||||
func Register(name string) {
|
||||
if _, ok := in[name]; ok {
|
||||
|
||||
Reference in New Issue
Block a user