diff --git a/app/sage.py b/app/sage.py index f34a52d..90b7aa9 100644 --- a/app/sage.py +++ b/app/sage.py @@ -5,7 +5,7 @@ import argparse from appPublic.log import MyLogger, info, debug, warning from appPublic.folderUtils import ProgramPath from appPublic.jsonConfig import getConfig -from appPublic.zmqapi import run_proxy +from appPublic.zmqapi import run_proxy, zmq_subscribe from appPublic.registerfunction import RegisterFunction from bricks_for_python.init import load_pybricks from ahserver.webapp import webapp @@ -55,7 +55,10 @@ async def msg_handler(msgstr): async def woa_msghande(): config = getConfig() debug(f'woa_msghander on({config.woa_handler_id}) starting ....') - await zmq_subscribe(config.woa_handler_id, msg_handler) + try: + await zmq_subscribe(config.woa_handler_id, msg_handler) + except Exception as e: + debug(f'Exception:{e}') debug('woa_msghandler stopped.................') def init():