Browse Source

socket listen bug

master
zrb 3 years ago
parent
commit
52c45f585b
  1. 3
      znet/server.go

3
znet/server.go

@ -85,8 +85,7 @@ func (s *Server) Start() {
//2 监听服务器地址 //2 监听服务器地址
listener, err := net.ListenTCP(s.IPVersion, addr) listener, err := net.ListenTCP(s.IPVersion, addr)
if err != nil { if err != nil {
fmt.Println("listen", s.IPVersion, "err", err)
return
panic(err)
} }
//已经监听成功 //已经监听成功

Loading…
Cancel
Save