1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

Stop retrying TURN access when forbidden

If we're not allowed to have TURN access, there's no reason to ask in a loop.
This commit is contained in:
J. Ryan Stinnett
2021-01-14 17:49:15 +00:00
parent f6d3b50b08
commit 159b98132d

View File

@@ -5425,6 +5425,11 @@ function checkTurnServers(client) {
}
}, function(err) {
logger.error("Failed to get TURN URIs");
// If we get a 403, there's no point in looping forever.
if (err.httpStatus === 403) {
logger.info("TURN access unavailable for this account");
return;
}
client._checkTurnServersTimeoutID = setTimeout(function() {
checkTurnServers(client);
}, 60000);