proxywatchd: add safeguards against tor outage
This commit is contained in:
@@ -59,6 +59,12 @@ class WorkerJob():
|
||||
err == rocksock.RS_E_HIT_TIMEOUT:
|
||||
# proxy is not online, so don't waste time trying all possible protocols
|
||||
break
|
||||
elif fp == 0 and \
|
||||
err == rocksock.RS_E_TARGET_CONN_REFUSED:
|
||||
fail_inc = 0
|
||||
if random.randint(0, (config.watchd.threads-1)/2) == 0:
|
||||
_log("could not connect to proxy 0, sleep 5s", "ERROR")
|
||||
time.sleep(5)
|
||||
elif et == rocksock.RS_ET_GAI:
|
||||
fail_inc = 0
|
||||
_log("could not resolve connection target %s"%srv, "ERROR")
|
||||
|
||||
Reference in New Issue
Block a user