Suppress negotiation timout log if signal disconnect (#1433)

* Suppress negotiation timout log if signal disconnect

* solve comment
This commit is contained in:
cnderrauber
2023-02-17 15:40:35 +08:00
committed by GitHub
parent 30834791fa
commit 6d16f061de
2 changed files with 9 additions and 1 deletions
+6
View File
@@ -717,3 +717,9 @@ func (t *TransportManager) UpdateLastSeenSignal() {
t.lastSignalAt = time.Now()
t.lock.Unlock()
}
func (t *TransportManager) SinceLastSignal() time.Duration {
t.lock.RLock()
defer t.lock.RUnlock()
return time.Since(t.lastSignalAt)
}