From 4c2dcb98ff8692cf3a437df14b4878a0dbdc0497 Mon Sep 17 00:00:00 2001 From: xdustinface Date: Wed, 11 May 2022 10:38:09 +0200 Subject: [PATCH] Reset `_sync_id` at the very end of `_finalize_sync` --- chia/plot_sync/sender.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chia/plot_sync/sender.py b/chia/plot_sync/sender.py index d58cfb34e95a..a9ea4f5f1497 100644 --- a/chia/plot_sync/sender.py +++ b/chia/plot_sync/sender.py @@ -293,9 +293,10 @@ def _finalize_sync(self) -> None: log.debug(f"_finalize_sync {self}") assert self._sync_id != 0 self._last_sync_id = self._sync_id - self._sync_id = uint64(0) self._next_message_id = uint64(0) self._messages.clear() + # Do this at the end since `_sync_id` is used as sync active indicator. + self._sync_id = uint64(0) def sync_active(self) -> bool: return self._sync_id != 0