Skip to content

Commit 83f0f2f

Browse files
committed
Always destroy tunnel when reconfiguring
1 parent 446ef2b commit 83f0f2f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ios/PacketTunnel/WireGuardAdapter/WgAdapter.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ struct WgAdapter: TunnelAdapterProtocol {
3232
func start(configuration: TunnelAdapterConfiguration) async throws {
3333
let wgConfig = configuration.asWgConfig
3434
do {
35-
try await adapter.update(tunnelConfiguration: wgConfig)
35+
try await adapter.stop()
36+
try await adapter.start(tunnelConfiguration: wgConfig)
3637
} catch WireGuardAdapterError.invalidState {
3738
try await adapter.start(tunnelConfiguration: wgConfig)
3839
}

0 commit comments

Comments
 (0)