From 7e0786aea20319814b961eaecdbaad690c541eb3 Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Thu, 1 Aug 2019 18:11:11 -0700 Subject: [PATCH] use the new retryContact plugin --- go/characters/appEventListener.go | 3 +++ go/characters/incominglistener.go | 5 ----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/go/characters/appEventListener.go b/go/characters/appEventListener.go index 3ee2f498..13d7458d 100644 --- a/go/characters/appEventListener.go +++ b/go/characters/appEventListener.go @@ -1,6 +1,7 @@ package characters import ( + "cwtch.im/cwtch/app/plugins" "cwtch.im/cwtch/event" "cwtch.im/ui/go/cwutil" "cwtch.im/ui/go/gobjects" @@ -66,6 +67,8 @@ func AppEventListener(gcd *gothings.GrandCentralDispatcher, subscribed chan bool } onion := e.Data[event.Identity] + the.CwtchApp.AddPeerPlugin(onion, plugins.CONTACTRETRY) + the.Peer = the.CwtchApp.GetPeer(onion) the.EventBus = the.CwtchApp.GetEventBus(onion) diff --git a/go/characters/incominglistener.go b/go/characters/incominglistener.go index 4b1602dc..ca45d994 100644 --- a/go/characters/incominglistener.go +++ b/go/characters/incominglistener.go @@ -101,11 +101,6 @@ func IncomingListener(uiState *gothings.InterfaceState, subscribed chan bool) { uiContact.Status = int(cxnState) uiState.UpdateContact(contact.Onion) } - - // Stub reconnection-handler simply attempts reconnection - if cxnState == connections.DISCONNECTED { - the.Peer.PeerWithOnion(contact.Onion) - } } case event.ServerStateChange: serverOnion := e.Data[event.GroupServer]