Merge pull request 'contact retry handle engine shutdown better' (#484) from contactRetryDisconn into master
continuous-integration/drone/push Build is pending
Details
continuous-integration/drone/push Build is pending
Details
Reviewed-on: #484 Reviewed-by: Sarah Jamie Lewis <sarah@openprivacy.ca>
This commit is contained in:
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…
Reference in New Issue