summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Müller <marcel-mueller@gmx.de>2023-12-10 20:41:29 +0100
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2023-12-11 07:21:43 +0000
commita334e3c6b69c64cc6257ddea2ec9dd8f799e58e7 (patch)
tree92793689a60ad5737760c56e2f83bad84641107d
parent28440171f4df7998ce9a265339066d7d50edf5c5 (diff)
Add backend url to connection error
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
-rw-r--r--src/utils/signaling.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/utils/signaling.js b/src/utils/signaling.js
index 5af2af5dd..dd4deb6b4 100644
--- a/src/utils/signaling.js
+++ b/src/utils/signaling.js
@@ -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) {
@@ -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'
@@ -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
}