From 9726e013b6313046d18ac0bfc596450637ab3a9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sun, 10 Dec 2023 20:41:29 +0100 Subject: [PATCH] Add backend url to connection error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- src/utils/signaling.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/utils/signaling.js b/src/utils/signaling.js index 5af2af5dd9b..dd4deb6b43c 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 }