From a51210b9cc71239352c55c849ed93b9e27df780f Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Mon, 28 Oct 2019 14:17:38 -0700 Subject: [PATCH] Autoreconnect --- bot.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bot.go b/bot.go index b8524ea..6abfac2 100644 --- a/bot.go +++ b/bot.go @@ -2,6 +2,7 @@ package bot import ( "cwtch.im/cwtch/app" + "cwtch.im/cwtch/app/plugins" "cwtch.im/cwtch/event" "cwtch.im/cwtch/peer" "git.openprivacy.ca/openprivacy/libricochet-go/connectivity" @@ -34,6 +35,7 @@ func (cb *CwtchBot) Launch() { cb.acn.WaitTillBootstrapped() app := app.NewApp(mn, cb.dir) + app.LoadProfiles("") if len(app.ListPeers()) == 0 { app.CreatePeer(cb.peername, "") @@ -41,6 +43,7 @@ func (cb *CwtchBot) Launch() { peers := app.ListPeers() for onion, _ := range peers { + app.AddPeerPlugin(onion, plugins.CONNECTIONRETRY) cb.Peer = app.GetPeer(onion) log.Infof("Running %v", onion) cb.Queue = event.NewQueue()