Interpret `api.session.timeout` as seconds, not hours
This config value _used_ to be defined in hours, but now is defined in
seconds.  The BOSH release has been updated to match, but that causes
sessions to expire by a factor of x3600 later than one would expect.
Fixes
@@ -767,7 +767,7 @@ func (c *Core) CleanupOrphanedObjects() {
func (c *Core) PurgeExpiredAPISessions() {
log.Infof("UPKEEP: purging expired API sessions...")
- if err := c.db.ClearExpiredSessions(time.Now().Add(0 - (time.Duration(c.Config.API.Session.Timeout) * time.Hour))); err != nil {
+ if err := c.db.ClearExpiredSessions(time.Now().Add(0 - (time.Duration(c.Config.API.Session.Timeout) * time.Second))); err != nil {
log.Errorf("Failed to purge expired API sessions: %s", err)
}
}
