starcraft66 / minecraft-discord-bridge

A minecraft <-> discord bridge with no server-side requirements
Apache License 2.0
30 stars 9 forks source link

Add a reconneciton failsafe #59

Closed starcraft66 closed 5 years ago

starcraft66 commented 5 years ago

As I am currently looking into https://github.com/ammaraskar/pyCraft/issues/146 and have not yet found a resolution, I think it would be a good idea to add a try/catch block to the re-connection code and "give up" and terminate itself if the server is up reconnecting fails n number of times in a row. Since the bot should be running as a supervised process, it will simply be restarted and hopefully connect to the server properly.