better dc handler. again
This commit is contained in:
parent
d6915f2cbb
commit
d4f4aebce3
14
main.go
14
main.go
|
@ -30,13 +30,19 @@ func main() {
|
||||||
start:
|
start:
|
||||||
Conn, err := xmpp.Dial("xmpp.ru:5222", "hypnotoad", "xmpp.ru", "pass", "AllHailHypnotoad", nil)
|
Conn, err := xmpp.Dial("xmpp.ru:5222", "hypnotoad", "xmpp.ru", "pass", "AllHailHypnotoad", nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalln("Conn", err)
|
log.Println("Conn", err)
|
||||||
|
time.Sleep(5 * time.Second)
|
||||||
|
goto start
|
||||||
}
|
}
|
||||||
if err := Conn.SignalPresence("dnd", "is there some food in this world?", 11); err != nil {
|
if err := Conn.SignalPresence("dnd", "is there some food in this world?", 12); err != nil {
|
||||||
log.Fatalln("Signal", err)
|
log.Println("Signal", err)
|
||||||
|
time.Sleep(5 * time.Second)
|
||||||
|
goto start
|
||||||
}
|
}
|
||||||
if err := Conn.SendPresence(room+"/"+name, ""); err != nil {
|
if err := Conn.SendPresence(room+"/"+name, ""); err != nil {
|
||||||
log.Fatalln("Presence", err)
|
log.Println("Presence", err)
|
||||||
|
time.Sleep(5 * time.Second)
|
||||||
|
goto start
|
||||||
}
|
}
|
||||||
|
|
||||||
go func(Conn *xmpp.Conn) {
|
go func(Conn *xmpp.Conn) {
|
||||||
|
|
Loading…
Reference in New Issue