From 4ccdde93c053b3c24befd9023e7d75710f691c11 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Mon, 14 May 2018 19:42:22 +0100 Subject: [PATCH] keep upload alive --- lib/client.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/client.js b/lib/client.js index 90af2656d..16c50b81e 100644 --- a/lib/client.js +++ b/lib/client.js @@ -709,6 +709,14 @@ Request.prototype._end = function() { // progress const handleProgress = (direction, e) => { + // reset 'deadline' timer if still sending data + if (self._timer) { + clearTimeout(self._timer); + } + // reset 'timeout' timer if still sending data + if (self._responseTimeoutTimer) { + clearTimeout(self._responseTimeoutTimer); + } if (e.total > 0) { e.percent = e.loaded / e.total * 100; }