Skip to content

Commit 07f15b4

Browse files
committed
Don't start the timer if voip not supported
1 parent 8375638 commit 07f15b4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/client.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5150,10 +5150,12 @@ MatrixClient.prototype.startClient = async function(opts) {
51505150
}
51515151

51525152
// periodically poll for turn servers if we support voip
5153-
this._checkTurnServersIntervalID = setInterval(() => {
5153+
if (this._supportsVoip) {
5154+
this._checkTurnServersIntervalID = setInterval(() => {
5155+
this._checkTurnServers();
5156+
}, TURN_CHECK_INTERVAL);
51545157
this._checkTurnServers();
5155-
}, TURN_CHECK_INTERVAL);
5156-
this._checkTurnServers();
5158+
}
51575159

51585160
if (this._syncApi) {
51595161
// This shouldn't happen since we thought the client was not running

0 commit comments

Comments
 (0)