Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add backend url to connection error #11181

Merged
merged 1 commit into from
Dec 11, 2023
Merged
Changes from all commits
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
9 changes: 7 additions & 2 deletions src/utils/signaling.js
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,10 @@ Signaling.Standalone.prototype.doSend = function(msg, callback) {
this.socket.send(JSON.stringify(msg))
}

Signaling.Standalone.prototype._getBackendUrl = function() {
return generateOcsUrl('apps/spreed/api/v3/signaling/backend')
}

Signaling.Standalone.prototype.sendHello = function() {
let msg
if (this.resumeId) {
Expand All @@ -1019,7 +1023,7 @@ Signaling.Standalone.prototype.sendHello = function() {
} else {
// Already reconnected with a new session.
this._forceReconnect = false
const url = generateOcsUrl('apps/spreed/api/v3/signaling/backend')
const url = this._getBackendUrl()
let helloVersion
if (this.hasFeature('hello-v2') && this.settings.helloAuthParams['2.0']) {
helloVersion = '2.0'
Expand Down Expand Up @@ -1073,7 +1077,8 @@ Signaling.Standalone.prototype.helloResponseReceived = function(data) {
}

// TODO(fancycode): How should this be handled better?
console.error('Could not connect to server', data)
const url = this._getBackendUrl()
console.error('Could not connect to server using backend url ' + url, data)
this.reconnect()
return
}
Expand Down
Loading