Skip to content

Commit

Permalink
Fix TL log spam. (#19032)
Browse files Browse the repository at this point in the history
* Debug TL log spam.

* Update chia/timelord/timelord.py

Co-authored-by: Kyle Altendorf <sda@fstab.net>

* Add log.exception.

---------

Co-authored-by: Kyle Altendorf <sda@fstab.net>
  • Loading branch information
fchirica and altendky authored Jan 7, 2025
1 parent b6d5afc commit 0748096
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions chia/timelord/timelord.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,18 +218,17 @@ async def _handle_client(self, reader: asyncio.StreamReader, writer: asyncio.Str

async def _stop_chain(self, chain: Chain) -> None:
try:
_, _, stop_writer = self.chain_type_to_stream[chain]
_, _, stop_writer = self.chain_type_to_stream.pop(chain)
if chain not in self.unspawned_chains:
self.unspawned_chains.append(chain)
if chain in self.allows_iters:
self.allows_iters.remove(chain)
stop_writer.write(b"010")
await stop_writer.drain()
self.allows_iters.remove(chain)
else:
log.error(f"Trying to stop {chain} before its initialization.")
stop_writer.close()
await stop_writer.wait_closed()
if chain not in self.unspawned_chains:
self.unspawned_chains.append(chain)
del self.chain_type_to_stream[chain]
except ConnectionResetError as e:
log.error(f"{e}")
except Exception as e:
Expand Down Expand Up @@ -1094,6 +1093,8 @@ async def _do_process_communication(

except ConnectionResetError as e:
log.debug(f"Connection reset with VDF client {e}")
except Exception:
log.exception("VDF client communication terminated abruptly")

async def _manage_discriminant_queue_sanitizer(self) -> None:
while not self._shut_down:
Expand Down

0 comments on commit 0748096

Please sign in to comment.