fix: socket异常退出捕获,停止信号退出循环读取
This commit is contained in:
@@ -27,7 +27,7 @@ func (c *ConnUDP) New() (*ConnUDP, error) {
|
||||
proto = "udp6"
|
||||
c.Addr = fmt.Sprintf("[%s]", c.Addr)
|
||||
}
|
||||
address := fmt.Sprintf("%s:%d", c.Addr, c.Port)
|
||||
address := net.JoinHostPort(c.Addr, fmt.Sprint(c.Port))
|
||||
|
||||
// 默认等待5s
|
||||
if c.DialTimeOut == 0 {
|
||||
|
||||
Reference in New Issue
Block a user