From c41d068c9fb281b6418f1d459199c55c43b00e92 Mon Sep 17 00:00:00 2001 From: Mickael Remond Date: Sat, 27 Jul 2019 15:19:32 -0700 Subject: [PATCH] Improve comments --- client.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client.go b/client.go index c4dd480..7bb7a80 100644 --- a/client.go +++ b/client.go @@ -96,15 +96,15 @@ func NewClient(config Config, r *Router) (c *Client, err error) { return nil, NewConnError(err, true) } - // fallback to jid domain + // Fallback to jid domain if config.Address == "" { config.Address = config.parsedJid.Domain - // fetch srv DNS-Entries + // 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 + // If we found matching DNS records, use the entry with highest weight bestSrv := srvEntries[0] for _, srv := range srvEntries { if srv.Priority <= bestSrv.Priority && srv.Weight >= bestSrv.Weight {