feat: give more time for calls to connect

pull/687/head
Ryan Zhao 2 years ago
parent 31605672e2
commit e3479107f3

@ -71,6 +71,7 @@ public final class SessionCall: CurrentCallProtocol, WebRTCSessionDelegate {
var connectingDate: Date? { var connectingDate: Date? {
didSet { didSet {
stateDidChange?() stateDidChange?()
resetTimeoutTimerIfNeeded()
hasStartedConnectingDidChange?() hasStartedConnectingDidChange?()
} }
} }
@ -421,6 +422,11 @@ public final class SessionCall: CurrentCallProtocol, WebRTCSessionDelegate {
} }
} }
public func resetTimeoutTimerIfNeeded() {
if self.timeOutTimer == nil { return }
setupTimeoutTimer()
}
public func invalidateTimeoutTimer() { public func invalidateTimeoutTimer() {
timeOutTimer?.invalidate() timeOutTimer?.invalidate()
timeOutTimer = nil timeOutTimer = nil

Loading…
Cancel
Save