Removed SkipTLS, fixed kosc's bullshit
This commit is contained in:
parent
4e91e698f3
commit
79a839b34a
6
main.go
6
main.go
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue