Skip to content

Commit

Permalink
feat: 代码调整#1539
Browse files Browse the repository at this point in the history
  • Loading branch information
zacYL committed Nov 4, 2024
1 parent 4edfd18 commit 1e8e153
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ abstract class AbstractArtifactResourceHandler(
try {
return measureThroughput {
val stream = requestLimitCheckService.bandwidthCheck(
inputStream, storageProperties.response.circuitBreakerThreshold,
recordAbleInputStream, storageProperties.response.circuitBreakerThreshold,
length
) ?: recordAbleInputStream.rateLimit(
responseRateLimitWrapper(storageProperties.response.rateLimit)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ open class DefaultArtifactResourceWriter(
val recordAbleInputStream = RecordAbleInputStream(inputStream)
zipOutput.putNextEntry(generateZipEntry(name, inputStream))
val stream = requestLimitCheckService.bandwidthCheck(
inputStream, storageProperties.response.circuitBreakerThreshold,
recordAbleInputStream, storageProperties.response.circuitBreakerThreshold,
inputStream.range.length
) ?: recordAbleInputStream.rateLimit(
responseRateLimitWrapper(storageProperties.response.rateLimit)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class CommonRateLimitInputStream(
} catch (ignore: InterruptedException) {
}
}
if (!flag && failedNum >= rateCheckContext.waitRound) {
if (!flag && failedNum > rateCheckContext.waitRound) {
if (rateCheckContext.dryRun) {
return
}
Expand Down

0 comments on commit 1e8e153

Please sign in to comment.