Skip to content

Commit

Permalink
changed order in client names resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
0xERR0R committed Oct 18, 2021
1 parent 2aed746 commit c5c3501
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions resolver/client_names_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ func (r *ClientNamesResolver) Resolve(request *model.Request) (*model.Response,

// returns names of client
func (r *ClientNamesResolver) getClientNames(request *model.Request) []string {
if request.RequestClientID != "" {
return []string{request.RequestClientID}
}

ip := request.ClientIP

if ip == nil {
Expand All @@ -90,10 +94,6 @@ func (r *ClientNamesResolver) getClientNames(request *model.Request) []string {
}
}

if request.RequestClientID != "" {
return []string{request.RequestClientID}
}

names := r.resolveClientNames(ip, withPrefix(request.Log, "client_names_resolver"))
r.cache.Set(ip.String(), names, cache.DefaultExpiration)

Expand Down

0 comments on commit c5c3501

Please sign in to comment.