From 59c5752c56c8890ac4b653a33e2c3cec5ecd4aba Mon Sep 17 00:00:00 2001 From: Matt Smith Date: Mon, 23 Jul 2018 18:10:15 -0700 Subject: [PATCH] Retry aborted chunks on OS sleep When OSX goes to sleep, Chrome throws `abort` on any running XHRs. On wake, this unhandled event causes resumable to hang. With this change, an upload will resume on wake. --- resumable.js | 1 + 1 file changed, 1 insertion(+) diff --git a/resumable.js b/resumable.js index cc746298..102dc7df 100644 --- a/resumable.js +++ b/resumable.js @@ -781,6 +781,7 @@ }; $.xhr.addEventListener('load', doneHandler, false); $.xhr.addEventListener('error', doneHandler, false); + $.xhr.addEventListener('abort', doneHandler, false); $.xhr.addEventListener('timeout', doneHandler, false); // Set up the basic query data from Resumable