🐛 catch another Exception (e.g. ValueError("Invalid Homeserver")) and try to reconnect
This commit is contained in:
parent
01b34783cf
commit
cb451f02af
1 changed files with 2 additions and 2 deletions
|
@ -117,9 +117,9 @@ The link will be valid for 7 days.""".format(os.getenv("REGISTRATION_URL") + res
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
bot.run()
|
bot.run()
|
||||||
except ServerDisconnectedError:
|
except (ServerDisconnectedError, ValueError):
|
||||||
time.sleep(5)
|
|
||||||
logging.info("connection lost, reconnecting in 5 seconds...")
|
logging.info("connection lost, reconnecting in 5 seconds...")
|
||||||
|
time.sleep(5)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
logging.info("exiting...")
|
logging.info("exiting...")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
Loading…
Reference in a new issue