From 70ed2a4d8394fa954d44beb3ab6a72760dffa3b7 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Fri, 8 Mar 2019 13:16:03 +0100 Subject: [PATCH] Reset reasserting flag on plain shutdown --- TunnelKit/Sources/AppExtension/TunnelKitProvider.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/TunnelKit/Sources/AppExtension/TunnelKitProvider.swift b/TunnelKit/Sources/AppExtension/TunnelKitProvider.swift index abe0f98..07cba96 100644 --- a/TunnelKit/Sources/AppExtension/TunnelKitProvider.swift +++ b/TunnelKit/Sources/AppExtension/TunnelKitProvider.swift @@ -456,9 +456,7 @@ extension TunnelKitProvider: SessionProxyDelegate { public func sessionDidStop(_: SessionProxy, shouldReconnect: Bool) { log.info("Session did stop") - if shouldReconnect { - reasserting = true - } + reasserting = shouldReconnect socket?.shutdown() }