Skip to content

Commit

Permalink
fix(JingleSessionPC): return when resolving to avoid double settling (j…
Browse files Browse the repository at this point in the history
  • Loading branch information
Auxane committed Oct 12, 2023
1 parent dc0f331 commit 510b646
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/xmpp/JingleSessionPC.js
Original file line number Diff line number Diff line change
Expand Up @@ -1325,6 +1325,8 @@ export default class JingleSessionPC extends JingleSession {
// The session might have been terminated before the task was executed, making it obsolete.
logger.debug(`${this} ICE restart task aborted: session terminated`);
success();

return;
}
logger.error(`${this} ICE restart task failed: ${error}`);
failure(error);
Expand Down Expand Up @@ -2203,6 +2205,8 @@ export default class JingleSessionPC extends JingleSession {
// The session might have been terminated before the task was executed, making it obsolete.
logger.debug(`${this} renegotiation after addTrack aborted: session terminated`);
resolve();

return;
}
logger.error(`${this} renegotiation after addTrack error`, error);
reject(error);
Expand Down Expand Up @@ -2320,6 +2324,8 @@ export default class JingleSessionPC extends JingleSession {
// The session might have been terminated before the task was executed, making it obsolete.
logger.debug('Replace track aborted: session terminated');
resolve();

return;
}
logger.error(`${this} Replace track error:`, error);
reject(error);
Expand Down Expand Up @@ -2523,6 +2529,8 @@ export default class JingleSessionPC extends JingleSession {
// The session might have been terminated before the task was executed, making it obsolete.
logger.debug(`${this} ${operationName} aborted: session terminated`);
resolve();

return;
}
logger.error(`${this} ${operationName} failed`);
reject(error);
Expand Down

0 comments on commit 510b646

Please sign in to comment.