catch some rocksock errors

this allows ppf to skip checks when a theorical proxy fails in certain manners
This commit is contained in:
mickael
2019-01-06 04:12:57 +00:00
parent 64d9da9156
commit e872caaa77

View File

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