Remove XHR from pending JS on exception

main
Mark Johnson 2021-11-10 14:59:32 +00:00 committed by Noel De Martin
parent 67ec08edea
commit 2aed85bb13
1 changed files with 12 additions and 7 deletions

View File

@ -98,6 +98,7 @@
var index = requestIndex++; var index = requestIndex++;
var key = 'httprequest-' + index; var key = 'httprequest-' + index;
try {
// Add to the list of pending requests. // Add to the list of pending requests.
addPending(key); addPending(key);
@ -107,6 +108,10 @@
}); });
return realOpen.apply(this, arguments); return realOpen.apply(this, arguments);
} catch (e) {
removePending(key);
throw e;
}
}; };
var waitingBlocked = false; var waitingBlocked = false;