From 79a839b34a05b4540171a52d023424abdb0a7b8f Mon Sep 17 00:00:00 2001 From: Alexey Derlaft Date: Tue, 18 Aug 2015 14:15:54 +0300 Subject: [PATCH] Removed SkipTLS, fixed kosc's bullshit --- main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 96a8576..961f44e 100644 --- a/main.go +++ b/main.go @@ -37,6 +37,8 @@ func main() { Conn *xmpp.Conn err error ) + +START: for { if Conn != nil { time.Sleep(5 * time.Second) @@ -44,7 +46,7 @@ func main() { time.Sleep(5 * time.Second) } - Conn, err = xmpp.Dial(connect, id, server, password, resource, &xmpp.Config{SkipTLS: true}) + Conn, err = xmpp.Dial(connect, id, server, password, resource, nil) if err != nil { log.Println("Conn", err) continue @@ -88,7 +90,7 @@ func main() { case next = <-cs: case <-time.After(65 * time.Second): log.Println(Conn.Close(), "\n\t", "closed after 65 seconds of inactivity") - break + continue START } switch t := next.Value.(type) { case *xmpp.ClientPresence: