Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix internal signaling status code detection
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen authored and backportbot[bot] committed Apr 27, 2020
commit 07983711973880559146e8c6cfe919b69a9e1d8a
8 changes: 3 additions & 5 deletions src/utils/signaling.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,12 +482,10 @@ Signaling.Internal.prototype._startPullingMessages = function() {
}.bind(this))
this._startPullingMessages()
}.bind(this))
.catch(function(jqXHR, textStatus/*, errorThrown */) {
if (jqXHR.status === 0 && textStatus === 'abort') {
// Request has been aborted. Ignore.
} else if (token !== this.currentRoomToken) {
.catch(function(error) {
if (token !== this.currentRoomToken) {
// User navigated away in the meantime. Ignore
} else if (jqXHR.status === 404 || jqXHR.status === 403) {
} else if (error.response.status === 404 || error.response.status === 403) {
console.error('Stop pulling messages because room does not exist or is not accessible')
this._trigger('pullMessagesStoppedOnFail')
} else if (token) {
Expand Down