fix: Add low-memory guard and cooldown for Discord message sending

This isn't quite the fix though just want to save my position till tomorrow and see what changes come up before and after
This commit is contained in:
2025-11-14 21:48:19 -05:00
parent efea4a1384
commit 13e3a56fa6
2 changed files with 26 additions and 4 deletions

View File

@@ -202,6 +202,7 @@ if wifi and wifi.isconnected():
# Send startup notification to Discord (with timeout, non-blocking)
try:
gc.collect() # free heap before HTTPS
success = discord_webhook.send_discord_message(f"Pico W online at http://{ifconfig[0]}")
if success:
print("Discord startup notification sent")