From e3479107f3da49991aa1623c0eabbd2f1a8609e9 Mon Sep 17 00:00:00 2001 From: Ryan Zhao Date: Mon, 5 Sep 2022 13:31:25 +1000 Subject: [PATCH] feat: give more time for calls to connect --- Session/Calls/Call Management/SessionCall.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Session/Calls/Call Management/SessionCall.swift b/Session/Calls/Call Management/SessionCall.swift index 56a6d8140..21614e218 100644 --- a/Session/Calls/Call Management/SessionCall.swift +++ b/Session/Calls/Call Management/SessionCall.swift @@ -71,6 +71,7 @@ public final class SessionCall: CurrentCallProtocol, WebRTCSessionDelegate { var connectingDate: Date? { didSet { stateDidChange?() + resetTimeoutTimerIfNeeded() hasStartedConnectingDidChange?() } } @@ -421,6 +422,11 @@ public final class SessionCall: CurrentCallProtocol, WebRTCSessionDelegate { } } + public func resetTimeoutTimerIfNeeded() { + if self.timeOutTimer == nil { return } + setupTimeoutTimer() + } + public func invalidateTimeoutTimer() { timeOutTimer?.invalidate() timeOutTimer = nil