We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c3e9eb commit 6f3da84Copy full SHA for 6f3da84
1 file changed
proxy/config.py
@@ -87,12 +87,21 @@ def refresh_cfproxy_domains() -> None:
87
proxy_config.active_cfproxy_domain = random.choice(pool)
88
89
90
+_refresh_stop: threading.Event = threading.Event()
91
+
92
93
def start_cfproxy_domain_refresh() -> None:
- threading.Thread(
- target=refresh_cfproxy_domains,
- daemon=True,
94
- name='cfproxy-domains-refresh',
95
- ).start()
+ global _refresh_stop
+ _refresh_stop.set()
96
+ _refresh_stop = threading.Event()
97
+ stop = _refresh_stop
98
99
+ def _loop():
100
+ refresh_cfproxy_domains()
101
+ while not stop.wait(timeout=3600):
102
103
104
+ threading.Thread(target=_loop, daemon=True, name='cfproxy-domains-refresh').start()
105
106
107
def parse_dc_ip_list(dc_ip_list: List[str]) -> Dict[int, str]:
0 commit comments