Browse Source

Merge pull request #311 from jhao104/develop

[fix]queue get  block=False
J_hao104 7 năm trước cách đây
mục cha
commit
39b8137a3a
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      Schedule/ProxyCheck.py

+ 2 - 2
Schedule/ProxyCheck.py

@@ -40,9 +40,9 @@ class ProxyCheck(ProxyManager, Thread):
 
 
     def run(self):
     def run(self):
         self.db.changeTable(self.useful_proxy_queue)
         self.db.changeTable(self.useful_proxy_queue)
-        while self.queue.qsize():
+        while True:
             try:
             try:
-                proxy = self.queue.get()
+                proxy = self.queue.get(block=False)
             except Empty:
             except Empty:
                 break
                 break
             count = self.item_dict[proxy]
             count = self.item_dict[proxy]