summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/lib/utils/poll.js
diff options
context:
space:
mode:
authorSimon Knox <psimyn@gmail.com>2017-07-18 11:35:43 +1000
committerSimon Knox <psimyn@gmail.com>2017-07-18 12:17:55 +1000
commit53e7bf047084876cf441c010f683119fc54dfb6a (patch)
tree70003b202939b301e0647bbc24038125e790272f /app/assets/javascripts/lib/utils/poll.js
parent00861676a0cac3154153ec1afd7582991628e16e (diff)
downloadgitlab-ce-53e7bf047084876cf441c010f683119fc54dfb6a.tar.gz
fix transient rspec failure due to Poll.js race condition35225-transient-poll
don't treat aborted requests as failures, they are often triggered during unload (e.g after clicking a link)
Diffstat (limited to 'app/assets/javascripts/lib/utils/poll.js')
-rw-r--r--app/assets/javascripts/lib/utils/poll.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/assets/javascripts/lib/utils/poll.js b/app/assets/javascripts/lib/utils/poll.js
index e31cc5fbabe..97666e13ebe 100644
--- a/app/assets/javascripts/lib/utils/poll.js
+++ b/app/assets/javascripts/lib/utils/poll.js
@@ -81,6 +81,9 @@ export default class Poll {
})
.catch((error) => {
notificationCallback(false);
+ if (error.status === httpStatusCodes.ABORTED) {
+ return;
+ }
errorCallback(error);
});
}