diff options
author | Phil Hughes <me@iamphill.com> | 2017-07-18 09:04:28 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-07-18 09:04:28 +0000 |
commit | 9d11a373f4f72119aa54ce3eec3d076cea7619c0 (patch) | |
tree | e73be89f117895278daa992ff0cce48c8b2521cd /app | |
parent | 9e5c8e5d7f81b88998c8def2f4a20d54eeee49d0 (diff) | |
parent | 53e7bf047084876cf441c010f683119fc54dfb6a (diff) | |
download | gitlab-ce-9d11a373f4f72119aa54ce3eec3d076cea7619c0.tar.gz |
Merge branch '35225-transient-poll' into 'master'
fix transient rspec failure due to Poll.js race condition
Closes #35225
See merge request !12930
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/lib/utils/http_status.js | 1 | ||||
-rw-r--r-- | app/assets/javascripts/lib/utils/poll.js | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/app/assets/javascripts/lib/utils/http_status.js b/app/assets/javascripts/lib/utils/http_status.js index 415e50f32ae..625e53ee9de 100644 --- a/app/assets/javascripts/lib/utils/http_status.js +++ b/app/assets/javascripts/lib/utils/http_status.js @@ -3,6 +3,7 @@ */ export default { + ABORTED: 0, NO_CONTENT: 204, OK: 200, }; 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); }); } |