Skip to content

Commit

Permalink
Fix sort for catch all server
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf committed Dec 29, 2016
1 parent 8e90fc0 commit f893a88
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/pkg/ingress/sort_ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ type ServerByName []*Server
func (c ServerByName) Len() int { return len(c) }
func (c ServerByName) Swap(i, j int) { c[i], c[j] = c[j], c[i] }
func (c ServerByName) Less(i, j int) bool {
// special case for catch all server
if c[j].Hostname == "_" {
return false
}
return c[i].Hostname < c[j].Hostname
}

Expand Down

0 comments on commit f893a88

Please sign in to comment.