info->debug fixes; rearrange integ test wait for connections for hopeful speed improvement #479

Merged
sarah merged 5 commits from connectionLogic into master 2022-12-05 16:30:14 +00:00
1 changed files with 9 additions and 6 deletions
Showing only changes of commit bdb4b93f59 - Show all commits

View File

@ -282,13 +282,16 @@ func (app *application) ActivateEngines(doListen, doPeers, doServers bool) {
func (app *application) ActivatePeerEngine(onion string, doListen, doPeers, doServers bool) {
profile := app.GetPeer(onion)
if profile != nil {
app.engines[profile.GetOnion()], _ = profile.GenerateProtocolEngine(app.acn, app.eventBuses[profile.GetOnion()])
app.eventBuses[profile.GetOnion()].Publish(event.NewEventList(event.ProtocolEngineCreated))
app.QueryACNStatus()
if doListen {
profile.Listen()
if _, exists := app.engines[onion]; !exists {
app.engines[profile.GetOnion()], _ = profile.GenerateProtocolEngine(app.acn, app.eventBuses[profile.GetOnion()])
app.eventBuses[profile.GetOnion()].Publish(event.NewEventList(event.ProtocolEngineCreated))
app.QueryACNStatus()
if doListen {
profile.Listen()
}
profile.StartConnections(doPeers, doServers)
}
profile.StartConnections(doPeers, doServers)
}
}