diff --git a/Sources/LiveViewNative/Coordinators/LiveSessionCoordinator.swift b/Sources/LiveViewNative/Coordinators/LiveSessionCoordinator.swift index d742c38d2..ba3acd0ee 100644 --- a/Sources/LiveViewNative/Coordinators/LiveSessionCoordinator.swift +++ b/Sources/LiveViewNative/Coordinators/LiveSessionCoordinator.swift @@ -216,6 +216,10 @@ public class LiveSessionCoordinator: ObservableObject { try await socket.shutdown() } + if let liveReloadChannel { + try? await liveReloadChannel.shutdownParentSocket() + } + let adapter = ReconnectStrategyAdapter(self.configuration.reconnectBehavior) self.liveSocket = try await LiveSocket( @@ -287,7 +291,7 @@ public class LiveSessionCoordinator: ObservableObject { func overrideLiveReloadChannel(channel: LiveChannel) async throws { if let liveReloadChannel { - try await liveReloadChannel.shutdownParentSocket() + try? await liveReloadChannel.shutdownParentSocket() self.liveReloadChannel = nil }