File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -90,9 +90,6 @@ def secure_proxy_url(tls_certificate_pem_path: str) -> Iterator[URL]:
9090 ]
9191
9292 with proxy .Proxy (input_args = proxypy_args ) as proxy_instance :
93- if os .name == "nt" :
94- spawned_threads = set (threading .enumerate ()) - baseline_threads
95-
9693 yield URL .build (
9794 scheme = "https" ,
9895 host = str (proxy_instance .flags .hostname ),
@@ -103,10 +100,13 @@ def secure_proxy_url(tls_certificate_pem_path: str) -> Iterator[URL]:
103100 deadline = time .monotonic () + 5.0
104101 while time .monotonic () < deadline :
105102 gc .collect ()
106- remaining = set (threading .enumerate ()). intersection ( spawned_threads )
107- if not remaining :
103+ new_threads = set (threading .enumerate ()) - baseline_threads
104+ if not new_threads :
108105 break
109106 time .sleep (0.05 )
107+ for _ in range (3 ):
108+ gc .collect ()
109+ time .sleep (0.1 )
110110
111111
112112@pytest .fixture
You can’t perform that action at this time.
0 commit comments