This commit is contained in:
cx uname 2014-02-25 16:45:30 +04:00
parent 919fc6aef5
commit 1bc53e1b15
1 changed files with 9 additions and 1 deletions

10
main.go
View File

@ -26,8 +26,16 @@ var (
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
var (
Conn *xmpp.Conn
err error
)
start:
Conn, err := xmpp.Dial("xmpp.ru:5222", "hypnotoad", "xmpp.ru", "pass", "AllHailHypnotoad", nil)
if Conn != nil {
log.Println("Conn check:", Conn.Close())
}
Conn, err = xmpp.Dial("xmpp.ru:5222", "hypnotoad", "xmpp.ru", "pass", "AllHailHypnotoad", nil)
if err != nil {
log.Println("Conn", err)
time.Sleep(5 * time.Second)