catches purchase-not-found exception

# Conflicts:
#	Tools/AutoClient/LoadBalancer.cs
This commit is contained in:
Ben 2025-06-10 12:48:23 +02:00
parent ccd6dc6e51
commit 75a8078f06
No known key found for this signature in database
GPG Key ID: 0F16E812E736C24B
3 changed files with 12 additions and 2 deletions

View File

@ -65,7 +65,8 @@ namespace AutoClient
{
while (running)
{
while (queue.Count == 0) Thread.Sleep(TimeSpan.FromSeconds(1.0));
while (running && queue.Count == 0) Thread.Sleep(TimeSpan.FromSeconds(1.0));
if (!running) return;
Action<CodexWrapper> action = w => { };
lock (queueLock)

View File

@ -163,7 +163,15 @@ namespace AutoClient.Modes.FolderStore
private StoragePurchase? GetPurchase(string purchaseId)
{
return instance.GetStoragePurchase(purchaseId);
try
{
return instance.GetStoragePurchase(purchaseId);
}
catch (Exception exc)
{
log.Error("Failed to get purchase: " + exc);
return null;
}
}
private bool NodeContainsBasicCid()

View File

@ -40,6 +40,7 @@ namespace AutoClient.Modes.FolderStore
{
if (app.Cts.IsCancellationRequested) return;
loadBalancer.CheckErrors();
slowModeHandler.Check();
if (!folderFile.ToLowerInvariant().EndsWith(FolderSaverFilename))
{