TunnelsManager: Error out only on no-internet scenario
The other scenario happens even during reloading of a tunnel for activation. Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
@@ -286,10 +286,10 @@ class TunnelsManager {
|
||||
// In case our attempt to start the tunnel, didn't succeed
|
||||
if (tunnel == s.tunnelBeingActivated) {
|
||||
if (session.status == .disconnected) {
|
||||
let error = (InternetReachability.currentStatus() == .notReachable ?
|
||||
TunnelsManagerError.tunnelActivationFailedNoInternetConnection :
|
||||
TunnelsManagerError.tunnelActivationFailedInternalError)
|
||||
s.activationDelegate?.tunnelActivationFailed(tunnel: tunnel, error: error)
|
||||
if (InternetReachability.currentStatus() == .notReachable) {
|
||||
let error = TunnelsManagerError.tunnelActivationFailedNoInternetConnection
|
||||
s.activationDelegate?.tunnelActivationFailed(tunnel: tunnel, error: error)
|
||||
}
|
||||
s.tunnelBeingActivated = nil
|
||||
} else if (session.status == .connected) {
|
||||
s.tunnelBeingActivated = nil
|
||||
|
||||
Reference in New Issue
Block a user