contact retry handle engine shutdown better
continuous-integration/drone/pr Build is passing Details

contactRetryDisconn
Dan Ballard 2 months ago
parent 4e2000cae4
commit 3bb2b0988e

@ -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