@@ -260,17 +260,17 @@ public override async Task Start(CancellationToken cancellationToken = default)
260260 if ( SuccessKey is null )
261261 throw new NullReferenceException ( "The success key cannot be null" ) ;
262262
263- var proxies = CheckOnlyUntested
263+ var proxies = ( CheckOnlyUntested
264264 ? Proxies . Where ( p => p . WorkingStatus == ProxyWorkingStatus . Untested )
265- : Proxies ;
265+ : Proxies ) . ToList ( ) ;
266266
267267 // Update the stats
268- Total = proxies . Count ( ) ;
268+ Total = proxies . Count ;
269269 Tested = proxies . Count ( p => p . WorkingStatus != ProxyWorkingStatus . Untested ) ;
270270 Working = proxies . Count ( p => p . WorkingStatus == ProxyWorkingStatus . Working ) ;
271271 NotWorking = proxies . Count ( p => p . WorkingStatus == ProxyWorkingStatus . NotWorking ) ;
272272
273- if ( ! proxies . Any ( ) )
273+ if ( proxies . Count == 0 )
274274 throw new Exception ( "No proxies provided to check" ) ;
275275
276276 Status = JobStatus . Waiting ;
@@ -285,7 +285,7 @@ public override async Task Start(CancellationToken cancellationToken = default)
285285 var workItems = proxies . Select ( p => new ProxyCheckInput ( p , Url , SuccessKey , Timeout , GeoProvider ) ) ;
286286 parallelizer = ParallelizerFactory < ProxyCheckInput , Proxy >
287287 . Create ( settings . RuriLibSettings . GeneralSettings . ParallelizerType , workItems ,
288- workFunction , Bots , Proxies . Count ( ) , 0 , BotLimit ) ;
288+ workFunction , Bots , proxies . Count , 0 , BotLimit ) ;
289289
290290 parallelizer . NewResult += UpdateProxy ;
291291 parallelizer . ProgressChanged += PropagateProgress ;
0 commit comments