Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
bosscheng committed Nov 20, 2020
2 parents dd23d81 + 1b9711e commit 2d61fc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion transaction/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type Device struct {
func (c *Core) RemoveDead() {
c.Devices.Range(func(k, v interface{}) bool {
device := v.(*Device)
if device.UpdateTime.Sub(device.RegisterTime) > time.Second*36 {
if device.UpdateTime.Sub(device.RegisterTime) > time.Duration(c.config.RegisterValidity)*time.Second {
c.Devices.Delete(k)
}
return true
Expand Down

0 comments on commit 2d61fc6

Please sign in to comment.