From 7deaf596428e2f45a9b7523729875a37fb2bac7a Mon Sep 17 00:00:00 2001 From: Mickael Remond Date: Sat, 27 Jul 2019 09:22:04 -0700 Subject: [PATCH] Quickfix for build error See #94 --- client.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client.go b/client.go index acd2ac0..c4dd480 100644 --- a/client.go +++ b/client.go @@ -99,17 +99,17 @@ func NewClient(config Config, r *Router) (c *Client, err error) { // fallback to jid domain if config.Address == "" { config.Address = config.parsedJid.Domain - + // fetch srv DNS-Entries _, srvEntries, err := net.LookupSRV("xmpp-client", "tcp", config.parsedJid.Domain) - + if err == nil && len(srvEntries) > 0 { // if find some use the entry with heightest weight bestSrv := srvEntries[0] for _, srv := range srvEntries { if srv.Priority <= bestSrv.Priority && srv.Weight >= bestSrv.Weight { bestSrv = srv - config.Address = ensurePort(srv.Target, srv.Port) + config.Address = ensurePort(srv.Target, int(srv.Port)) } } }