VPN: TunnelsManager: Fix deletion code

This commit is contained in:
Roopesh Chander 2018-11-01 15:53:10 +05:30
parent c999c2a0ec
commit d62c1fd84a
1 changed files with 1 additions and 1 deletions

View File

@ -213,7 +213,7 @@ class TunnelsManager {
}
if let s = self {
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.tunnelNames.remove(tunnelName)