Skip to content

Commit

Permalink
add a copy of the loop variable
Browse files Browse the repository at this point in the history
fix #38
  • Loading branch information
chrislusf authored and chrislusf committed Apr 17, 2016
1 parent 5908f71 commit a2af298
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resource/service_discovery/master/master_allocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ func (tl *TeamMaster) findServers(dc *resource.DataCenter, req *resource.Allocat

requests := make([]*resource.ComputeRequest, 0, len(req.Requests))
for _, request := range req.Requests {
requests = append(requests, &request)
req := &request
requests = append(requests, req)
}
sort.Sort(ByRequestedResources(requests))

Expand Down

0 comments on commit a2af298

Please sign in to comment.