VPN: TunnelsManager: Fix deletion code
This commit is contained in:
parent
c999c2a0ec
commit
d62c1fd84a
|
@ -213,7 +213,7 @@ class TunnelsManager {
|
||||||
}
|
}
|
||||||
if let s = self {
|
if let s = self {
|
||||||
for i in ((tunnelIndex + 1) ..< s.tunnels.count) {
|
for i in ((tunnelIndex + 1) ..< s.tunnels.count) {
|
||||||
s.tunnels[i].index = s.tunnels[i].index + 1
|
s.tunnels[i].index = s.tunnels[i].index - 1
|
||||||
}
|
}
|
||||||
s.tunnels.remove(at: tunnelIndex)
|
s.tunnels.remove(at: tunnelIndex)
|
||||||
s.tunnelNames.remove(tunnelName)
|
s.tunnelNames.remove(tunnelName)
|
||||||
|
|
Loading…
Reference in New Issue