diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index c270aa271d..04653f2a6d 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -15263,7 +15263,7 @@ repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 212.1.0; + version = 212.1.1; }; }; 9FF521422BAA8FF300B9819B /* XCRemoteSwiftPackageReference "lottie-spm" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 683548b7c5..913850b2ce 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/BrowserServicesKit", "state" : { - "revision" : "a3d5a2fc45ce000515b04666aa2fa7ad2d30e288", - "version" : "212.1.0" + "revision" : "db9c29a429896138fab29da987981a5f4a8d6712", + "version" : "212.1.1" } }, { diff --git a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionTunnelController.swift b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionTunnelController.swift index 8982657cf6..a35f9a6d29 100644 --- a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionTunnelController.swift +++ b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionTunnelController.swift @@ -665,16 +665,23 @@ final class NetworkProtectionTunnelController: TunnelController, TunnelSessionPr /// @MainActor func stop() async { + await stop(disableOnDemand: true) + } + + @MainActor + func stop(disableOnDemand: Bool) async { guard let manager = await manager else { return } - await stop(tunnelManager: manager) + await stop(tunnelManager: manager, disableOnDemand: disableOnDemand) } @MainActor - private func stop(tunnelManager: NETunnelProviderManager) async { - try? await self.disableOnDemand(tunnelManager: tunnelManager) + private func stop(tunnelManager: NETunnelProviderManager, disableOnDemand: Bool) async { + if disableOnDemand { + try? await self.disableOnDemand(tunnelManager: tunnelManager) + } switch tunnelManager.connection.status { case .connected, .connecting, .reasserting: @@ -692,15 +699,7 @@ final class NetworkProtectionTunnelController: TunnelController, TunnelSessionPr /// @MainActor func restart() async { - guard let manager = await manager else { - return - } - - await stop(tunnelManager: manager) - await start() - - // When restarting the tunnel we enable on-demand optimistically - try? await enableOnDemand(tunnelManager: manager) + await stop(disableOnDemand: false) } // MARK: - On Demand & Kill Switch diff --git a/LocalPackages/DataBrokerProtection/Package.swift b/LocalPackages/DataBrokerProtection/Package.swift index 79a7f64269..d67b0e6c01 100644 --- a/LocalPackages/DataBrokerProtection/Package.swift +++ b/LocalPackages/DataBrokerProtection/Package.swift @@ -29,7 +29,7 @@ let package = Package( targets: ["DataBrokerProtection"]) ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "212.1.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "212.1.1"), .package(path: "../SwiftUIExtensions"), .package(path: "../AppKitExtensions"), .package(path: "../XPCHelper"), diff --git a/LocalPackages/FeatureFlags/Package.swift b/LocalPackages/FeatureFlags/Package.swift index e78e95eb9d..c20ac7b026 100644 --- a/LocalPackages/FeatureFlags/Package.swift +++ b/LocalPackages/FeatureFlags/Package.swift @@ -32,7 +32,7 @@ let package = Package( targets: ["FeatureFlags"]), ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "212.1.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "212.1.1"), ], targets: [ // Targets are the basic building blocks of a package, defining a module or a test suite. diff --git a/LocalPackages/NetworkProtectionMac/Package.swift b/LocalPackages/NetworkProtectionMac/Package.swift index 6aeafb5fd6..85e3711e8f 100644 --- a/LocalPackages/NetworkProtectionMac/Package.swift +++ b/LocalPackages/NetworkProtectionMac/Package.swift @@ -32,7 +32,7 @@ let package = Package( .library(name: "VPNAppLauncher", targets: ["VPNAppLauncher"]), ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "212.1.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "212.1.1"), .package(url: "https://github.com/airbnb/lottie-spm", exact: "4.4.3"), .package(path: "../AppLauncher"), .package(path: "../UDSHelper"), diff --git a/LocalPackages/SubscriptionUI/Package.swift b/LocalPackages/SubscriptionUI/Package.swift index f9c036861f..702f56ecf3 100644 --- a/LocalPackages/SubscriptionUI/Package.swift +++ b/LocalPackages/SubscriptionUI/Package.swift @@ -12,7 +12,7 @@ let package = Package( targets: ["SubscriptionUI"]), ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "212.1.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "212.1.1"), .package(path: "../SwiftUIExtensions") ], targets: [