Skip to content

Commit

Permalink
show attempt in the warn
Browse files Browse the repository at this point in the history
  • Loading branch information
nkonev committed Dec 25, 2024
1 parent 9b73252 commit 28f04a6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions frontend/src/ChatVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -524,13 +524,19 @@ export default {
// it takes 1 or some retries
//
// without this retry it's going to just return the error to user
const maxAttempts = 10;
const retryOptions = {
delay: 200,
maxAttempts: 10,
maxAttempts: maxAttempts,
};
try {
this.inRestarting = true;
await retry(async (context) => {
const attempt = context.attemptNum + 1
if (attempt > 1) {
this.setWarning("Connecting to the room, attempt " + attempt + " / " + maxAttempts);
}
if (this.room) {
await this.room.connect(getWebsocketUrlPrefix() + '/api/livekit', token, {
// subscribe to other participants automatically
Expand All @@ -545,7 +551,7 @@ export default {
// because of this retry
this.finishedConnectingToRoom = true;
this.updateInitializingVideoCall();
this.closeError();
} else {
console.warn("Didn't connect to room because it's null. It is ok when user leaves very fast.");
}
Expand Down

0 comments on commit 28f04a6

Please sign in to comment.