summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Müller <marcel-mueller@gmx.de>2023-12-11 08:14:27 +0100
committerGitHub <noreply@github.com>2023-12-11 08:14:27 +0100
commit31473011a4aae71d1626a29209d9eadafab9ad3f (patch)
tree27f8e9d23484991ede90f29fd3166c5f9f346f57
parent0c1029ed2e245061f04c4aa7114ded697c9a73f3 (diff)
parent4de641e1d1404ab7c577c1c1e84f166226bfefd2 (diff)
Merge pull request #11181 from nextcloud/feat/noid/log-backend-url-on-error
Add backend url to connection error
-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
}