rougeth / bottery

[DEVELOPMENT-HALTED] :battery: A bot framework with batteries included
MIT License
344 stars 51 forks source link

TelegramEngine reaches recursion limit after a while #91

Closed ElSaico closed 7 years ago

ElSaico commented 7 years ago

With #79 solved, it seems a couple issues were unearthed.

After a while, since Python lacks tail-recursion due to a design decision by Guido himself, those consecutive calls to self.polling end up hitting the runtime's recursion depth limit, throwing a RecursionError in the process.

Of course, the bot becomes inoperant after this.

rougeth commented 7 years ago

Thanks @ElSaico! Any suggestion on how to solve this?

rougeth commented 7 years ago

Fixed here: https://github.com/rougeth/bottery/blob/master/bottery/platform/telegram.py#L114