改进UDP IsOk的使用方法

This commit is contained in:
刘祥超
2021-06-07 15:48:39 +08:00
parent f461760158
commit f3a45e9e64

View File

@@ -45,7 +45,7 @@ func (this *UDPListener) Serve() error {
this.connLocker.Lock()
conn, ok := this.connMap[addr.String()]
this.connLocker.Unlock()
if ok && !conn.isOk {
if ok && !conn.IsOk() {
_ = conn.Close()
ok = false
}