diff --git a/archived/aria2_0.8.0.js b/archived/aria2_0.8.0.js index 57ab3df..f3b2a2f 100644 --- a/archived/aria2_0.8.0.js +++ b/archived/aria2_0.8.0.js @@ -38,7 +38,7 @@ class Aria2 { return this.jsonrpc.secret; } set retries (number) { - this.jsonrpc.retries = isNaN(number) ? Infinity : number; + this.jsonrpc.retries = isNaN(number) || number === -1 ? Infinity : number; } get retries () { return isNaN(this.jsonrpc.retries) ? Infinity : this.jsonrpc.retries; diff --git a/aria2.js b/aria2.js index 57ab3df..f3b2a2f 100644 --- a/aria2.js +++ b/aria2.js @@ -38,7 +38,7 @@ class Aria2 { return this.jsonrpc.secret; } set retries (number) { - this.jsonrpc.retries = isNaN(number) ? Infinity : number; + this.jsonrpc.retries = isNaN(number) || number === -1 ? Infinity : number; } get retries () { return isNaN(this.jsonrpc.retries) ? Infinity : this.jsonrpc.retries;