only first stream would retry now

This commit is contained in:
Killer069 2021-09-13 11:14:30 +05:30 committed by GitHub
parent c427ff9326
commit 047d5a666a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -180,7 +180,7 @@ export class Stream {
"range" : `bytes=${this.bytes_count}-${end >= this.content_length ? '' : end}` "range" : `bytes=${this.bytes_count}-${end >= this.content_length ? '' : end}`
} }
}) })
if(Number(stream.statusCode) >= 400){ if(Number(stream.statusCode) >= 400 && this.bytes_count === 0){
this.cleanup() this.cleanup()
await this.retry() await this.retry()
this.loop() this.loop()