Skip to content

Commit f3e259e

Browse files
committed
feat: shuffle IPs for speedtesting
1 parent 64b5471 commit f3e259e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

threads.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# -*- coding: utf-8 -*-
22
import asyncio
3+
import random
4+
35
from PySide6.QtCore import QThread, Signal
46
from utils import get_session, ip_generator, test_ip
57

@@ -21,6 +23,7 @@ def __init__(self, parent, ips, host, request_format,
2123
self.num_workers = num_workers
2224

2325
def run(self):
26+
random.shuffle(self.ips)
2427
loop = asyncio.new_event_loop()
2528
asyncio.set_event_loop(loop)
2629
try:

0 commit comments

Comments
 (0)