From e6630ecf31dad94143ae3893e90d4ccd1fe74e54 Mon Sep 17 00:00:00 2001 From: Eugenio Romano Date: Fri, 18 May 2018 17:17:49 +0100 Subject: [PATCH] clear timeout 100 percent --- lib/client.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/client.js b/lib/client.js index 5f8c8e7ec..e1a752f6a 100644 --- a/lib/client.js +++ b/lib/client.js @@ -723,8 +723,10 @@ Request.prototype._end = function() { if (e.total > 0) { e.percent = e.loaded / e.total * 100; - } else if(e.total = 100){ - clearTimeout(self._uploadTimeoutTimer); + + if(e.percent === 100) { + clearTimeout(self._uploadTimeoutTimer); + } } e.direction = direction;