From 0e6327115faf2457587fbe60e6816b7766f73d9b Mon Sep 17 00:00:00 2001 From: Maksim Stepanov Date: Sat, 16 Jan 2016 20:28:14 +0300 Subject: [PATCH] Fixed host completion in 'connect' --- xmpp.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmpp.go b/xmpp.go index bb0c472..b0a7d2e 100644 --- a/xmpp.go +++ b/xmpp.go @@ -70,12 +70,12 @@ func connect(host, user, passwd string) (net.Conn, error) { if strings.TrimSpace(host) == "" { a := strings.SplitN(user, "@", 2) if len(a) == 2 { - host = a[1] + addr = a[1] } } a := strings.SplitN(host, ":", 2) if len(a) == 1 { - host += ":5222" + addr += ":5222" } proxy := os.Getenv("HTTP_PROXY") if proxy == "" {