Преглед изворни кода

Free rate limit queue when upload times out (#2016) (#2018)

rtaieb пре 5 година
родитељ
комит
bdc8862d76
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      packages/@uppy/xhr-upload/src/index.js

+ 1 - 0
packages/@uppy/xhr-upload/src/index.js

@@ -217,6 +217,7 @@ module.exports = class XHRUpload extends Plugin {
 
 
       const timer = new ProgressTimeout(opts.timeout, () => {
       const timer = new ProgressTimeout(opts.timeout, () => {
         xhr.abort()
         xhr.abort()
+        queuedRequest.done()
         const error = new Error(this.i18n('timedOut', { seconds: Math.ceil(opts.timeout / 1000) }))
         const error = new Error(this.i18n('timedOut', { seconds: Math.ceil(opts.timeout / 1000) }))
         this.uppy.emit('upload-error', file, error)
         this.uppy.emit('upload-error', file, error)
         reject(error)
         reject(error)