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