Removed SkipTLS, fixed kosc's bullshit

This commit is contained in:
Alexey Derlaft 2015-08-18 14:15:54 +03:00
parent 4e91e698f3
commit 79a839b34a
1 changed files with 4 additions and 2 deletions

View File

@ -37,6 +37,8 @@ func main() {
Conn *xmpp.Conn Conn *xmpp.Conn
err error err error
) )
START:
for { for {
if Conn != nil { if Conn != nil {
time.Sleep(5 * time.Second) time.Sleep(5 * time.Second)
@ -44,7 +46,7 @@ func main() {
time.Sleep(5 * time.Second) 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 { if err != nil {
log.Println("Conn", err) log.Println("Conn", err)
continue continue
@ -88,7 +90,7 @@ func main() {
case next = <-cs: case next = <-cs:
case <-time.After(65 * time.Second): case <-time.After(65 * time.Second):
log.Println(Conn.Close(), "\n\t", "closed after 65 seconds of inactivity") log.Println(Conn.Close(), "\n\t", "closed after 65 seconds of inactivity")
break continue START
} }
switch t := next.Value.(type) { switch t := next.Value.(type) {
case *xmpp.ClientPresence: case *xmpp.ClientPresence: