diff --git a/supervisor/ingress.py b/supervisor/ingress.py index e661eb1a9..da36a0919 100644 --- a/supervisor/ingress.py +++ b/supervisor/ingress.py @@ -109,17 +109,19 @@ class Ingress(JsonConfig, CoreSysAttributes): def validate_session(self, session: str) -> bool: """Return True if session valid and make it longer valid.""" if session not in self.sessions: + _LOGGER.debug("Session %f is not known", session) return False # check if timestamp valid, to avoid crash on malformed timestamp try: valid_until = utc_from_timestamp(self.sessions[session]) except OverflowError: - _LOGGER.warning("Session timestamp %f is invalid!", self.sessions[session]) - return False + self.sessions[session] = utcnow() + timedelta(minutes=15) + return True # Is still valid? if valid_until < utcnow(): + _LOGGER.debug("Session is no longer valid (%f/%f)", valid_until, utcnow()) return False # Update time