Send disconnected participant update for reconnecting user (#1495)

* Send disconnected participant update for reconnecting user

* clean code
This commit is contained in:
cnderrauber
2023-03-07 09:13:15 +08:00
committed by GitHub
parent e2ebb22b3a
commit 48cf30ba23
4 changed files with 62 additions and 8 deletions
+6
View File
@@ -733,6 +733,12 @@ func (t *TransportManager) SinceLastSignal() time.Duration {
return time.Since(t.lastSignalAt)
}
func (t *TransportManager) LastSeenSignalAt() time.Time {
t.lock.RLock()
defer t.lock.RUnlock()
return t.lastSignalAt
}
func (t *TransportManager) canUseICETCP() bool {
return t.params.TCPFallbackRTTThreshold == 0 || int(t.signalingRTT) < t.params.TCPFallbackRTTThreshold
}