Skip to content

Commit

Permalink
SigHelper: Fix inverted time comparison in 'check_update' (#4845)
Browse files Browse the repository at this point in the history
Closes issue 4840
  • Loading branch information
SamantazFox committed Aug 24, 2024
2 parents cd2daf4 + 466bfbb commit 15669ac
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/invidious/helpers/signatures.cr
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ class Invidious::DecryptFunction
end

def check_update
now = Time.utc

# If we have updated in the last 5 minutes, do nothing
return if (now - @last_update) > 5.minutes
return if (Time.utc - @last_update) < 5.minutes

# Get the amount of time elapsed since when the player was updated, in the
# event where multiple invidious processes are run in parallel.
Expand Down

0 comments on commit 15669ac

Please sign in to comment.