diff --git a/bigbluebutton-html5/imports/api/audio/client/bridge/sip.js b/bigbluebutton-html5/imports/api/audio/client/bridge/sip.js index b9a73a55f1bdc08d733fb5ea48d97e866d89fc86..720e88586a9b78e9c619601ad86d8247cdaad2be 100755 --- a/bigbluebutton-html5/imports/api/audio/client/bridge/sip.js +++ b/bigbluebutton-html5/imports/api/audio/client/bridge/sip.js @@ -541,19 +541,19 @@ class SIPSession { }, }, `User agent reconnection attempt ${attempts}`); - setTimeout(() => { - this.userAgent.reconnect().then(() => { - this._reconnecting = false; - resolve(); - }).catch(() => { + this.userAgent.reconnect().then(() => { + this._reconnecting = false; + resolve(); + }).catch(() => { + setTimeout(() => { this._reconnecting = false; this.reconnect(++attempts).then(() => { resolve(); }).catch((error) => { reject(error); }); - }); - }, USER_AGENT_RECONNECTION_DELAY_MS); + }, USER_AGENT_RECONNECTION_DELAY_MS); + }); }); }