Handle exceptions when trying to start resolver thread

This commit is contained in:
Kenny Lee Sin Cheong 2018-09-07 13:26:49 -04:00
parent 7563d97be4
commit 7743cc44fa

View file

@ -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)