Skip to content

Commit

Permalink
fix deleteLease
Browse files Browse the repository at this point in the history
  • Loading branch information
bran-4paradigm committed Dec 16, 2019
1 parent 960b324 commit 905c5d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions subnet/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ func (lw *leaseWatcher) remove(lease *Lease) Event {
}

func deleteLease(l []Lease, i int) []Lease {
l[i] = l[len(l)-1]
return l[:len(l)-1]
l = append(l[:i], l[i+1:]...)
return l
}

// WatchLease performs a long term watch of the given network's subnet lease
Expand Down

0 comments on commit 905c5d6

Please sign in to comment.