From 7743cc44fa62430b8b2e3f1efcef427d2ce922fb Mon Sep 17 00:00:00 2001 From: Kenny Lee Sin Cheong Date: Fri, 7 Sep 2018 13:26:49 -0400 Subject: [PATCH] Handle exceptions when trying to start resolver thread --- util/ipresolver/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util/ipresolver/__init__.py b/util/ipresolver/__init__.py index ce71f8ac3..c55ca2d11 100644 --- a/util/ipresolver/__init__.py +++ b/util/ipresolver/__init__.py @@ -130,7 +130,10 @@ class IPResolver(IPResolverInterface): def _get_location_function(self): if not self.app.config.get('TESTING', False) and not self._worker.is_alive(): - self._worker.start() + try: + self._worker.start() + except: + logger.exception('Got exception try to start ip resolver thread') try: cache = CACHE sync_token = cache.get('sync_token', None)