From 54a2a0cb35b0ea1932fd89d900d462ee6d361ed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Wed, 29 Apr 2015 17:19:30 +0200 Subject: [PATCH] Added exception checking on service main loop for windows --- actors/src/udsactor/windows/UDSActorService.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/actors/src/udsactor/windows/UDSActorService.py b/actors/src/udsactor/windows/UDSActorService.py index 1ab6bd8aa..352d6b2ef 100644 --- a/actors/src/udsactor/windows/UDSActorService.py +++ b/actors/src/udsactor/windows/UDSActorService.py @@ -291,7 +291,10 @@ class UDSActorSvc(win32serviceutil.ServiceFramework, CommonService): pythoncom.PumpWaitingMessages() if counter >= 60: # Once every minute counter = 0 - self.checkIpsChanged() + try: + self.checkIpsChanged() + except Exception as e: + logger.error('Error checking ip change: {}'.format(e)) # In milliseconds, will break win32event.WaitForSingleObject(self.hWaitStop, 1000)