Merge pull request 'contact retry handle engine shutdown better' (#484) from contactRetryDisconn into master
continuous-integration/drone/push Build is pending Details

Reviewed-on: #484
Reviewed-by: Sarah Jamie Lewis <sarah@openprivacy.ca>
master
Sarah Jamie Lewis 2 months ago
commit a698f34bfa

@ -255,6 +255,17 @@ func (cr *contactRetry) run() {
case event.ProtocolEngineShutdown:
cr.ACNUp = false
cr.protocolEngine = false
cr.connections.Range(func(k, v interface{}) bool {
p := v.(*contact)
if p.state == connections.AUTHENTICATED || p.state == connections.SYNCED {
p.lastSeen = time.Now()
}
p.state = connections.DISCONNECTED
p.failedCount = 0
return true
})
case event.ACNStatus:
prog := e.Data[event.Progress]
if !cr.protocolEngine {

Loading…
Cancel
Save