From 0ff27fc9ac1ed23dbbd1915a20998b212fd93794 Mon Sep 17 00:00:00 2001 From: Chotow Date: Thu, 18 Mar 2021 11:05:03 +0800 Subject: [PATCH] fix(server): listen udp port failed (#2308) fix #2306 --- server/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/service.go b/server/service.go index fe54cf7..677bda0 100644 --- a/server/service.go +++ b/server/service.go @@ -265,7 +265,7 @@ func NewService(cfg config.ServerCommonConf) (svr *Service, err error) { // Create nat hole controller. if cfg.BindUDPPort > 0 { var nc *nathole.Controller - address := net.JoinHostPort(cfg.BindAddr, strconv.Itoa(cfg.BindPort)) + address := net.JoinHostPort(cfg.BindAddr, strconv.Itoa(cfg.BindUDPPort)) nc, err = nathole.NewController(address) if err != nil { err = fmt.Errorf("Create nat hole controller error, %v", err)