From e872caaa7768886835b2494eb9195e87fe2cf81c Mon Sep 17 00:00:00 2001 From: mickael Date: Sun, 6 Jan 2019 04:12:57 +0000 Subject: [PATCH] catch some rocksock errors this allows ppf to skip checks when a theorical proxy fails in certain manners --- proxywatchd.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/proxywatchd.py b/proxywatchd.py index f6a8bf3..f1902c4 100644 --- a/proxywatchd.py +++ b/proxywatchd.py @@ -48,6 +48,14 @@ class WorkerJob(): return sock, proto, duration, torhost, srv except KeyboardInterrupt as e: raise(e) + except rocksock.RocksockException as e: + ## tor cannot connect + if e.failedproxy == None: break + ## connexion failed + elif int(e.error) in [12, 13, 20, 24]: break + ## generic errors + #elif int(e.error) == 7: continue + #print('proxy#: %s, errortype: %s, error: %s' % (e.failedproxy, e.errortype, e.error)) except: sock.disconnect() return None, None, None, None, None