Fix maxRetries request option handling (#1296)
This commit is contained in:
committed by
GitHub
parent
f15ecd8477
commit
96a54d0539
@ -135,7 +135,8 @@ class Transport {
|
||||
// a copy of the stream to be able to send it again, but since we don't know in advance
|
||||
// the size of the stream, we risk to take too much memory.
|
||||
// Furthermore, copying everytime the stream is very a expensive operation.
|
||||
const maxRetries = isStream(params.body) ? 0 : options.maxRetries || this.maxRetries
|
||||
const maxRetries = isStream(params.body) || isStream(params.bulkBody)
|
||||
? 0 : (typeof options.maxRetries === 'number' ? options.maxRetries : this.maxRetries)
|
||||
const compression = options.compression !== undefined ? options.compression : this.compression
|
||||
var request = { abort: noop }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user