mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-02-04 13:59:20 -08:00
Refactor ClientManager into a more generic StreamManager
This commit is contained in:
committed by
Mickaël Rémond
parent
54dfa60f12
commit
021f6d3740
@@ -28,7 +28,7 @@ func main() {
|
||||
|
||||
// If you pass the client to a connection manager, it will handle the reconnect policy
|
||||
// for you automatically.
|
||||
cm := xmpp.NewClientManager(client, nil)
|
||||
cm := xmpp.NewStreamManager(client, nil)
|
||||
err = cm.Start()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
||||
@@ -107,7 +107,7 @@ func connectXmpp(jid string, password string, address string) (client *xmpp.Clie
|
||||
return
|
||||
}
|
||||
|
||||
if _, err = client.Connect(); err != nil {
|
||||
if err = client.Connect(); err != nil {
|
||||
return
|
||||
}
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user