Skip to content

Commit

Permalink
_blockchain_lock_queue is not always initialized by the time we shut …
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn authored Nov 29, 2021
1 parent 7f2be11 commit 8d617f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions chia/full_node/full_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,8 @@ def _close(self):
self.uncompact_task.cancel()
if self._transaction_queue_task is not None:
self._transaction_queue_task.cancel()
self._blockchain_lock_queue.close()
if hasattr(self, "_blockchain_lock_queue"):
self._blockchain_lock_queue.close()

async def _await_closed(self):
cancel_task_safe(self._sync_task, self.log)
Expand All @@ -722,7 +723,8 @@ async def _await_closed(self):
await self.connection.close()
if self._init_weight_proof is not None:
await asyncio.wait([self._init_weight_proof])
await self._blockchain_lock_queue.await_closed()
if hasattr(self, "_blockchain_lock_queue"):
await self._blockchain_lock_queue.await_closed()

async def _sync(self):
"""
Expand Down

0 comments on commit 8d617f0

Please sign in to comment.