CyberKiller

Results 9 comments of CyberKiller

I also bumped into this issue randomly out of the blue on my Raspberry Pi running Raspbian Stretch Lite. Is it because I have both the ethernet and the wireless...

I found a workaround for this by adding `ExecStartPre=/bin/sh -c 'until ping -c1 discord.com; do sleep 1; done;'` under `[Service]` in the systemd service file for the bot. This ExecStartPre...

> > I found a workaround for this by adding `ExecStartPre=/bin/sh -c 'until ping -c1 discord.com; do sleep 1; done;'` under `[Service]` in the systemd service file for the bot....

I had a little poke around debugging with visual studio code I found this is the last line (of the bots code) that gets executed before the hang: https://github.com/Cog-Creators/Red-DiscordBot/blob/7dfe24397ee40114f164c919e77a19c1be45cb5b/redbot/__main__.py#L445C9-L445C9 After...

After some more poking around I found that if an exception isn't caught inside run_bot() and sys.exit() isn't called, the bot will hang inside the exception handler and shutdown handler....

On further thought, I realise that a catch all exception will probably not be acceptable, as it will catch exceptions during the running of the bot and not just at...

> Errors while the bot is running don't generally propagate this far and are handled earlier by things such as loop's exception handler. If they do propagate here, something more...

I suspect if any exception doesn't get caught by run_bot() while the bot is starting up then the hang will occur. ~~The question is does having a catch all exception...

I had a little more of a poke around and I think I found out the real cause of the hang: if red_exception_handler() catches an exception and calls shutdown_handler(), then...