diff options
| author | JP Dillingham <jp@dillingham.me> | 2024-02-03 19:00:37 -0600 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2024-02-03 19:00:37 -0600 |
| commit | 6fb9c9cca24260ad33fa121fc935e293f5c98f66 (patch) | |
| tree | 4fa01ac00879d02999858535d4045b2e4e40bc34 /src | |
| parent | c2a3adcff71c40f0a81565f26238c9b6c9b0695f (diff) | |
| download | slskd-6fb9c9cca24260ad33fa121fc935e293f5c98f66.tar.gz | |
undo failure handing
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Application.cs | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs index b647ba39..facea568 100644 --- a/src/slskd/Application.cs +++ b/src/slskd/Application.cs @@ -1,4 +1,4 @@ -// <copyright file="Application.cs" company="slskd Team"> +// <copyright file="Application.cs" company="slskd Team"> // Copyright (c) slskd Team. All rights reserved. // // This program is free software: you can redistribute it and/or modify @@ -545,16 +545,14 @@ namespace slskd * 2) that were started within the time period * 3) that did not end due to an error (state includes errored, exception column is set) */ - (bool Files, bool Megabytes, bool Failures) OverLimits( - (int Files, long Bytes, int Failures) stats, + (bool Files, bool Megabytes) OverLimits( + (int Files, long Bytes) stats, Options.GroupsOptions.LimitsExtendedOptions options, Options.GroupsOptions.LimitsExtendedOptions defaults, long size) { var files = false; var megabytes = false; - var failures = false; - var byteLimit = options?.Megabytes ?? defaults?.Megabytes; if (byteLimit is not null && byteLimit >= 0 && (stats.Bytes + size) > (byteLimit * 1000 * 1000)) @@ -571,15 +569,7 @@ namespace slskd files = true; } - var failureLimit = options?.Failures ?? defaults?.Failures; - - if (failureLimit is not null && failureLimit >= 0 && stats.Failures > failureLimit) - { - Log.Debug("Number of failed transfers exceeds limit of {Limit}", failureLimit); - failures = true; - } - - return (files, megabytes, failures); + return (files, megabytes); } // start with the queue, since that should contain the fewest files and should be the least expensive to check |
