Skip to content

Commit 09c0ac2

Browse files
committed
Revert "Try to escalate earlier"
This reverts commit 1fb19be.
1 parent 5a1c6a8 commit 09c0ac2

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

Sources/LiveKit/Core/Room+Engine.swift

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -413,17 +413,7 @@ extension Room {
413413
}
414414
} catch {
415415
self.log("[Connect] Reconnect mode: \(mode) failed with error: \(error)", .error)
416-
417-
if case .quick = mode, shouldEscalateToFullReconnect(error: error) {
418-
_state.mutate {
419-
if $0.nextReconnectMode == nil {
420-
$0.nextReconnectMode = .full
421-
self.log("[Connect] Escalating to full reconnect due to error type: \(error)", .error)
422-
}
423-
}
424-
}
425-
426-
// Re-throw to trigger retry
416+
// Re-throw
427417
throw error
428418
}
429419
}
@@ -505,17 +495,4 @@ extension Room {
505495

506496
return publisher
507497
}
508-
509-
private func shouldEscalateToFullReconnect(error: Error) -> Bool {
510-
guard let lkError = error as? LiveKitError else {
511-
return true
512-
}
513-
514-
switch lkError.type {
515-
case .network, .timedOut, .serverPingTimedOut: // JS: SignalReconnectError
516-
return false
517-
default:
518-
return true
519-
}
520-
}
521498
}

0 commit comments

Comments
 (0)