Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public class LiveSessionCoordinator<R: RootRegistry>: ObservableObject {
$navigationPath.scan(([LiveNavigationEntry<R>](), [LiveNavigationEntry<R>]()), { ($0.1, $1) }).sink { [weak self] prev, next in
guard let self else { return }
Task {
try await prev.last?.coordinator.disconnect()
try? await prev.last?.coordinator.disconnect()
if prev.count > next.count {
let targetEntry = self.liveSocket!.getEntries()[next.count - 1]
next.last?.coordinator.join(
Expand Down Expand Up @@ -213,7 +213,7 @@ public class LiveSessionCoordinator<R: RootRegistry>: ObservableObject {
.merging(additionalHeaders ?? [:]) { $1 }

if let socket {
try await socket.shutdown()
try? await socket.shutdown()
}

let adapter = ReconnectStrategyAdapter(self.configuration.reconnectBehavior)
Expand Down Expand Up @@ -336,7 +336,7 @@ public class LiveSessionCoordinator<R: RootRegistry>: ObservableObject {
private func disconnect(preserveNavigationPath: Bool = false) async {
do {
for entry in self.navigationPath {
try await entry.coordinator.disconnect()
try? await entry.coordinator.disconnect()
if !preserveNavigationPath {
entry.coordinator.document = nil
}
Expand All @@ -360,7 +360,7 @@ public class LiveSessionCoordinator<R: RootRegistry>: ObservableObject {

self.liveReloadChannel = nil

try await self.socket?.shutdown()
try? await self.socket?.shutdown()
self.socket = nil
self.liveSocket = nil
self.state = .disconnected
Expand Down
Loading