use the new plugin contactRetry in app #192
|
@ -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)
|
||||
|
||||
|
|
|
@ -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]
|
||||
|
|
Reference in New Issue