Skip to content

Commit

Permalink
Fixed missing defer on locking on ListRoute operation (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
zuzzas authored Jan 19, 2023
1 parent 9f7e69a commit c35e724
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cloudprovider/yandex/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (yc *Cloud) ListRoutes(ctx context.Context, _ string) ([]*cloudprovider.Rou
klog.Info("ListRoutes called")

if routeAPILock.TryLock() {
routeAPILock.Unlock()
defer routeAPILock.Unlock()
} else {
return nil, errors.New("VPC route API locked")
}
Expand Down

0 comments on commit c35e724

Please sign in to comment.