VPN: TunnelsManager: Fix deletion code
Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
parent
2870175ab2
commit
040ce32015
|
@ -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