Skip to content

Commit

Permalink
add a cap on the max retries to avoid any abuse
Browse files Browse the repository at this point in the history
  • Loading branch information
paulo-ocean committed Dec 16, 2024
1 parent 6381795 commit a237137
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/services/Aquarius.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ export class Aquarius {
maxRetries: number = 100
): Promise<Asset> {
let tries = 0
// lets have a cap to prevent possible abuse as well
if (maxRetries > 500) {
LoggerInstance.warn('Max Limit exceeded, defaulting to 500 retries.')
maxRetries = 500
}
do {
try {
const path = this.aquariusURL + '/api/aquarius/assets/ddo/' + did
Expand Down

0 comments on commit a237137

Please sign in to comment.