Skip to content

Commit 0cc5098

Browse files
committed
fix: cgo dns resolution crash fix
1 parent e912675 commit 0cc5098

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

version/detect.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package version
33
import (
44
"context"
55
"fmt"
6+
"os"
67
"strconv"
78
"strings"
89
)
@@ -17,6 +18,7 @@ func UpgradeDetect() error {
1718
if err != nil {
1819
return fmt.Errorf("Failed to parse local version: %s err: %v", Version, err)
1920
}
21+
os.Setenv("GODEBUG", "netdns=go")
2022

2123
ctx, cancel := context.WithCancel(context.TODO())
2224
defer cancel()

0 commit comments

Comments
 (0)