fix: 移除ws心跳的验证器

main v1.2.6
NoahLan 1 year ago
parent 10f91288bc
commit 96689a49b8

@ -45,11 +45,11 @@ func WithHeartbeatWS(interval time.Duration, hbdFn WsHeartbeatFn) nnet.RunOption
break break
} }
deadline := time.Now().Add(-2 * m.interval).Unix() //deadline := time.Now().Add(-2 * m.interval).Unix()
if atomic.LoadInt64(&m.lastAt) < deadline { //if atomic.LoadInt64(&m.lastAt) < deadline {
nlog.Errorf("Heartbeat timeout, LastTime=%d, Deadline=%d", atomic.LoadInt64(&m.lastAt), deadline) // nlog.Errorf("Heartbeat timeout, LastTime=%d, Deadline=%d", atomic.LoadInt64(&m.lastAt), deadline)
break // break
} //}
err := m.hbdFn(nc.WsConn()) err := m.hbdFn(nc.WsConn())
if err != nil { if err != nil {

Loading…
Cancel
Save