Experiments Update on Load
This commit is contained in:
parent
195e048410
commit
05e77604d2
|
@ -312,10 +312,14 @@ func (app *application) installProfile(profile peer.CwtchPeer) bool {
|
|||
if app.peers[profile.GetOnion()] == nil {
|
||||
eventBus := event.NewEventManager()
|
||||
app.eventBuses[profile.GetOnion()] = eventBus
|
||||
profile.Init(app.eventBuses[profile.GetOnion()])
|
||||
app.registerHooks(profile)
|
||||
profile.Init(app.eventBuses[profile.GetOnion()])
|
||||
app.peers[profile.GetOnion()] = profile
|
||||
|
||||
// Update the Peer with the Most Recent Experiment State...
|
||||
settings := app.settings.ReadGlobalSettings()
|
||||
profile.UpdateExperiments(settings.ExperimentsEnabled, settings.Experiments)
|
||||
|
||||
app.AddPeerPlugin(profile.GetOnion(), plugins.CONNECTIONRETRY) // Now Mandatory
|
||||
|
||||
app.appBus.Publish(event.NewEvent(event.NewPeer, map[event.Field]string{event.Identity: profile.GetOnion(), event.Created: event.False}))
|
||||
|
|
Loading…
Reference in New Issue