Fix wsrelay KeyboardInteruption not respected (#15036)

- stop wsrelay on keyboard interuption
- restart wsrelay for any other failure reason
This commit is contained in:
Hao Liu 2024-03-26 13:29:15 -04:00 committed by GitHub
parent 3f566c8737
commit 8cafdf0400
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -171,5 +171,8 @@ class Command(BaseCommand):
try:
asyncio.run(websocket_relay_manager.run())
except KeyboardInterrupt:
logger.info('Restarting Websocket Relayer')
logger.info('Shutting down Websocket Relayer')
break
except Exception as e:
logger.exception('Error in Websocket Relayer, exception: {}. Restarting in 10 seconds'.format(e))
time.sleep(10)