whatsapp-bot-seed
whatsapp-bot-seed copied to clipboard
Script stops working if I lose internet connectivity while the script is running
Hi.
First of all, thanks for making the library. I would never have figured out how to use yowsup on my own.
I am running the script on a raspberry pi in headless mode. Internet connectivity is not that great here and when I lose my connection the script just stops working. Like, no error message, no exceptions, nothing.
Shouldn't this bit 'self.stack.loop(timeout=0.5, discrete=0.5)' produce an error/exception when the internet is down? I tried to add try/except around server.start() and wanted to exit the script, so that supervisor can restart the script. But the code never stops running.
Can't figure out why. Any help on the matter will be appreciated.
Thanks again!
Hi,
this is true there should be a way for the bot to detect if he has still a valid connection to the whatsapp server, if not restart himself (something like a watchdog for the bot).
Regards X23
Hi @abinash111, glad to hear that the bot is running in a raspberry pi! That's really cool.
And yes, right now it does not restart when losing connection. As far as I understand yowsup, it should, but something is wrong. I'll let this issue open until I check it better.