# HG changeset patch # User Chris Jones # Date 1378608597 25200 # Node ID f9ccfaf672ed18ac498aff7f71692dd9dc0af5b1 # Parent da6f37ae3ffe018738003a0e739830b408027700 Address a bug that can happen if no SRV records can be found. diff -r da6f37ae3ffe -r f9ccfaf672ed xmpp/xmpp.go --- a/xmpp/xmpp.go Sat Sep 07 14:43:54 2013 -0700 +++ b/xmpp/xmpp.go Sat Sep 07 19:49:57 2013 -0700 @@ -110,8 +110,10 @@ // Resolve the domain in the JID. _, srvs, err := net.LookupSRV(clientSrv, "tcp", jid.Domain) if err != nil { - return nil, errors.New("LookupSrv " + jid.Domain + - ": " + err.Error()) + return nil, fmt.Errorf("LookupSrv %s: %v", jid.Domain, err) + } + if len(srvs) == 0 { + return nil, fmt.Errorf("LookupSrv %s: no results", jid.Domain) } var tcp *net.TCPConn