Skip to content

Commit

Permalink
Remove rule expiry checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkren committed Aug 21, 2019
1 parent 4e5f204 commit b03ff11
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions pkg/router/managed_routing_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ func (rt *managedRoutingTable) Cleanup() error {
expiredIDs := make([]routing.RouteID, 0)
rt.mu.Lock()
err := rt.RangeRules(func(routeID routing.RouteID, rule routing.Rule) bool {
//if rule.Expiry().Before(time.Now()) {
if lastActivity, ok := rt.activity[routeID]; !ok || time.Since(lastActivity) > routeKeepalive {
expiredIDs = append(expiredIDs, routeID)
}
//}
return true
})
rt.mu.Unlock()
Expand Down
4 changes: 0 additions & 4 deletions pkg/router/route_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,6 @@ func (rm *routeManager) GetRule(routeID routing.RouteID) (routing.Rule, error) {
return nil, errors.New("corrupted rule")
}

if rule.Expiry().Before(time.Now()) {
return nil, errors.New("expired routing rule")
}

return rule, nil
}

Expand Down

0 comments on commit b03ff11

Please sign in to comment.