mirror of
https://github.com/hengyoush/kyanos.git
synced 2025-12-20 01:03:46 +08:00
fix: cgo dns resolution crash fix
This commit is contained in:
@@ -3,6 +3,7 @@ package version
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
@@ -17,6 +18,7 @@ func UpgradeDetect() error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("Failed to parse local version: %s err: %v", Version, err)
|
||||
}
|
||||
os.Setenv("GODEBUG", "netdns=go")
|
||||
|
||||
ctx, cancel := context.WithCancel(context.TODO())
|
||||
defer cancel()
|
||||
|
||||
Reference in New Issue
Block a user