Fix recorder LRU being destroyed if event session is reopened (#88448)

This commit is contained in:
J. Nick Koston 2023-02-19 12:20:01 -06:00 committed by GitHub
parent 1cdd914411
commit 08cdb0e3ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1027,11 +1027,11 @@ class Recorder(threading.Thread):
def _close_event_session(self) -> None: def _close_event_session(self) -> None:
"""Close the event session.""" """Close the event session."""
self._old_states = {} self._old_states.clear()
self._state_attributes_ids = {} self._state_attributes_ids.clear()
self._event_data_ids = {} self._event_data_ids.clear()
self._pending_state_attributes = {} self._pending_state_attributes.clear()
self._pending_event_data = {} self._pending_event_data.clear()
if not self.event_session: if not self.event_session:
return return