Support reconnects

This commit is contained in:
Asim Aslam
2019-10-13 18:36:22 +01:00
parent d6c6e7815e
commit f77df51f60
4 changed files with 68 additions and 39 deletions

View File

@@ -18,6 +18,10 @@ func (r *Resolver) Resolve(name string) ([]*resolver.Record, error) {
port = "8085"
}
if len(host) == 0 {
host = "localhost"
}
addrs, err := net.LookupHost(host)
if err != nil {
return nil, err