[GH-18965] - Pass expire time from outside Cleanup method (#19008)

Pass expire time from outside Cleanup method

Fixes #18965
Этот коммит содержится в:
Kirill Krotov
2021-12-22 12:27:30 +03:00
коммит произвёл GitHub
родитель c198ef6e16
Коммит 0dbc74f6d5
9 изменённых файлов: 73 добавлений и 15 удалений

Просмотреть файл

@@ -1491,7 +1491,11 @@ func doSecurity(s *Server) {
}
func doTokenCleanup(s *Server) {
s.Store.Token().Cleanup()
expiry := model.GetMillis() - model.MaxTokenExipryTime
mlog.Debug("Cleaning up token store.")
s.Store.Token().Cleanup(expiry)
}
func doCommandWebhookCleanup(s *Server) {