Merge pull request 'Activate Peers After Purging Retries' (#534) from stable-blockers into master
continuous-integration/drone/push Build is pending
Details
continuous-integration/drone/push Build is pending
Details
Reviewed-on: #534 Reviewed-by: Dan Ballard <dan@openprivacy.ca>
This commit is contained in:
commit
51d146fb5c
11
app/app.go
11
app/app.go
|
@ -402,6 +402,12 @@ func (app *application) ActivatePeerEngine(onion string) {
|
|||
func (app *application) ConfigureConnections(onion string, listen bool, peers bool, servers bool) {
|
||||
profile := app.GetPeer(onion)
|
||||
if profile != nil {
|
||||
|
||||
// if we are making a decision to ignore
|
||||
if !peers || !servers {
|
||||
app.eventBuses[profile.GetOnion()].Publish(event.NewEventList(event.PurgeRetries))
|
||||
}
|
||||
|
||||
// enable the engine if it doesn't exist...
|
||||
// note: this function is idempotent
|
||||
app.ActivatePeerEngine(onion)
|
||||
|
@ -409,10 +415,7 @@ func (app *application) ConfigureConnections(onion string, listen bool, peers bo
|
|||
profile.Listen()
|
||||
}
|
||||
|
||||
// if we are making a decision to ignore
|
||||
if !peers || !servers {
|
||||
app.eventBuses[profile.GetOnion()].Publish(event.NewEventList(event.PurgeRetries))
|
||||
}
|
||||
|
||||
app.eventBuses[profile.GetOnion()].Publish(event.NewEventList(event.ResumeRetries))
|
||||
profile.StartConnections(peers, servers)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue