Permalink
Browse files

Don't let the server ID be 127.0.0.1

  • Loading branch information...
abh committed Feb 23, 2018
1 parent eef6aab commit f1c6e92d5f2c6c6c6ecc3e595376aecb4f53ef8e
Showing with 9 additions and 5 deletions.
  1. +9 −5 util.go
14 util.go
@@ -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)
}

0 comments on commit f1c6e92

Please sign in to comment.