Browse Source

fix(server): listen udp port failed (#2308)

fix #2306
pull/2310/head
Chotow 4 years ago committed by GitHub
parent
commit
0ff27fc9ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      server/service.go

2
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)

Loading…
Cancel
Save