Skip to content

Commit

Permalink
Don't let the server ID be 127.0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
abh committed Feb 23, 2018
1 parent eef6aab commit f1c6e92
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions util.go
Expand Up @@ -42,12 +42,16 @@ func getInterfaces() []string {

// default to the first interfaces
// todo: skip 127.0.0.1 and ::1 ?
if len(serverInfo.ID) == 0 {
serverInfo.ID = ip
}
if len(serverInfo.IP) == 0 {
serverInfo.IP = ip

if ip != "127.0.0.1" {
if len(serverInfo.ID) == 0 {
serverInfo.ID = ip
}
if len(serverInfo.IP) == 0 {
serverInfo.IP = ip
}
}

inter = append(inter, host)

}
Expand Down

0 comments on commit f1c6e92

Please sign in to comment.