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
|
// In case our attempt to start the tunnel, didn't succeed
|
||||||
if (tunnel == s.tunnelBeingActivated) {
|
if (tunnel == s.tunnelBeingActivated) {
|
||||||
if (session.status == .disconnected) {
|
if (session.status == .disconnected) {
|
||||||
let error = (InternetReachability.currentStatus() == .notReachable ?
|
if (InternetReachability.currentStatus() == .notReachable) {
|
||||||
TunnelsManagerError.tunnelActivationFailedNoInternetConnection :
|
let error = TunnelsManagerError.tunnelActivationFailedNoInternetConnection
|
||||||
TunnelsManagerError.tunnelActivationFailedInternalError)
|
s.activationDelegate?.tunnelActivationFailed(tunnel: tunnel, error: error)
|
||||||
s.activationDelegate?.tunnelActivationFailed(tunnel: tunnel, error: error)
|
}
|
||||||
s.tunnelBeingActivated = nil
|
s.tunnelBeingActivated = nil
|
||||||
} else if (session.status == .connected) {
|
} else if (session.status == .connected) {
|
||||||
s.tunnelBeingActivated = nil
|
s.tunnelBeingActivated = nil
|
||||||
|
|||||||
Reference in New Issue
Block a user