fix: nat指定目标stun服务后,保证服务地址读取成功

pull/1286/head
和家豪 2024-05-30 11:42:10 +08:00
parent ab648d6f0c
commit ab8aa6be9f
1 changed files with 1 additions and 0 deletions

View File

@ -115,6 +115,7 @@ func main() {
return
case "nat":
c := stun.NewClient()
flag.CommandLine.Parse(os.Args[2:])
c.SetServerAddr(*stunAddr)
nat, host, err := c.Discover()
if err != nil || host == nil {