Skip to content

Commit

Permalink
session: do not print the annoying 'no such host' error log when auth…
Browse files Browse the repository at this point in the history
…orization fails (pingcap#13989)
  • Loading branch information
tiancaiamao authored and XiaTianliang committed Dec 21, 2019
1 parent 22715ed commit c3aa97b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -1508,7 +1508,10 @@ func getHostByIP(ip string) []string {
return []string{variable.DefHostname}
}
addrs, err := net.LookupAddr(ip)
terror.Log(errors.Trace(err))
if err != nil {
// The error is ignorable.
// The empty line here makes the golint tool (which complains err is not checked) happy.
}
return addrs
}

Expand Down

0 comments on commit c3aa97b

Please sign in to comment.