change window calculation

This commit is contained in:
ffdfgdfg
2020-01-02 23:47:27 +08:00
parent a0a2cd1d47
commit f5fce6d1f4
5 changed files with 21 additions and 90 deletions

View File

@@ -220,7 +220,7 @@ func (s *Mux) pingReturn() {
case data = <-s.pingCh:
atomic.StoreUint32(&s.pingCheckTime, 0)
case <-s.closeChan:
break
return
}
_ = now.UnmarshalText(data)
latency := time.Now().UTC().Sub(now).Seconds() / 2