Use static 5 second retry wait period

This commit is contained in:
Robert Long 2021-08-11 14:39:04 -07:00
commit 6addd838b4

View file

@ -619,7 +619,7 @@ export class ConferenceCallManager extends EventEmitter {
content, content,
stateKey, stateKey,
callback, callback,
maxAttempts = 3 maxAttempts = 5
) { ) {
const sendStateEventWithRetry = async (attempt = 0) => { const sendStateEventWithRetry = async (attempt = 0) => {
try { try {
@ -635,9 +635,7 @@ export class ConferenceCallManager extends EventEmitter {
throw error; throw error;
} }
await new Promise((resolve) => await new Promise((resolve) => setTimeout(resolve(), 5));
setTimeout(resolve(), Math.pow(2, attempt) * 5)
);
return sendStateEventWithRetry(attempt + 1); return sendStateEventWithRetry(attempt + 1);
} }