Skip to content

Commit dda436b

Browse files
committed
Preserve deque maxlen when loading persisted history
1 parent 38534c5 commit dda436b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

custom_components/dnsdist/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ async def _async_ensure_history_loaded(self) -> None:
250250

251251
if history:
252252
history.sort(key=lambda x: x[0])
253-
self._history = deque(history)
253+
self._history = deque(history, maxlen=self._history.maxlen)
254254
self._history_dirty = False
255255

256256
async def _async_save_history(self) -> None:

0 commit comments

Comments
 (0)