take care of "failinc"

This commit is contained in:
mickael
2019-01-06 14:57:09 +00:00
parent cff3e1304c
commit 1adf78119d

View File

@@ -46,19 +46,19 @@ class WorkerJob():
sock = rocksock.Rocksock(host=srv, port=6697, ssl=True, proxies=proxies, timeout=config.timeout)
sock.connect()
sock.send('%s\n' % random.choice(['NICK', 'USER', 'JOIN', 'MODE', 'PART', 'INVITE', 'KNOCK', 'WHOIS', 'WHO', 'NOTICE', 'PRIVMSG', 'PING', 'QUIT']))
return sock, proto, duration, torhost, srv
return sock, proto, duration, torhost, srv, 0
except KeyboardInterrupt as e:
raise(e)
except: sock.disconnect()
return None, None, None, None, None
return None, None, None, None, None, 1
def run(self):
self.nextcheck = (time.time() + 1800 + ((1+int(self.failcount)) * 3600))
sock, proto, duration, tor, srv = self.connect_socket()
sock, proto, duration, tor, srv, failinc = self.connect_socket()
if not sock:
self.failcount += 1
self.failcount += failinc
return
try:
recv = sock.recv(6)