Skip to content

Commit

Permalink
fix a copy of the ComputeRequests #38
Browse files Browse the repository at this point in the history
  • Loading branch information
radike committed Apr 19, 2016
1 parent 7ad0b8c commit 06cb78e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions resource/service_discovery/master/master_allocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ func (tl *TeamMaster) findServers(dc *resource.DataCenter, req *resource.Allocat
sort.Sort(ByAvailableResources(racks))

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

Expand Down

0 comments on commit 06cb78e

Please sign in to comment.