mirror of
https://github.com/passepartoutvpn/wireguard-apple.git
synced 2025-01-17 22:09:06 +00:00
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:
parent
1fd0c56f08
commit
1ded24f0e0
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user