contact retry handle engine shutdown better #484
|
@ -255,6 +255,17 @@ func (cr *contactRetry) run() {
|
||||||
case event.ProtocolEngineShutdown:
|
case event.ProtocolEngineShutdown:
|
||||||
cr.ACNUp = false
|
cr.ACNUp = false
|
||||||
cr.protocolEngine = 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:
|
case event.ACNStatus:
|
||||||
prog := e.Data[event.Progress]
|
prog := e.Data[event.Progress]
|
||||||
if !cr.protocolEngine {
|
if !cr.protocolEngine {
|
||||||
|
|
Loading…
Reference in New Issue