diff --git a/oml/nodes.py b/oml/nodes.py index cdb9d9c..b661a5f 100644 --- a/oml/nodes.py +++ b/oml/nodes.py @@ -11,13 +11,13 @@ import urllib.request, urllib.error, urllib.parse from datetime import datetime import os import time +import socket import ox from tornado.ioloop import PeriodicCallback import settings import user.models -from changelog import Changelog from websocket import trigger_event from localnodes import LocalNodes @@ -297,6 +297,9 @@ class Node(Thread): self._opener.addheaders = list(zip(self.headers.keys(), self.headers.values())) try: r = self._opener.open(url, timeout=self.TIMEOUT*5) + except socket.timeout: + logger.debug('timeout %s', url) + return False except: logger.debug('openurl failed %s', url, exc_info=True) return False