Skip to content

Commit

Permalink
Await handleCallEvent()
Browse files Browse the repository at this point in the history
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
  • Loading branch information
SimonBrandner committed Aug 16, 2021
1 parent 082169a commit b9e5417
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/webrtc/callEventHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class CallEventHandler {
continue;
}
try {
this.handleCallEvent(e);
await this.handleCallEvent(e);
} catch (e) {
logger.error("Caught exception handling call event", e);
}
Expand All @@ -100,7 +100,7 @@ export class CallEventHandler {

if (event.isBeingDecrypted() || event.isDecryptionFailure()) {
// add an event listener for once the event is decrypted.
event.once("Event.decrypted", () => {
event.once("Event.decrypted", async () => {
if (!this.eventIsACall(event)) return;

if (this.callEventBuffer.includes(event)) {
Expand All @@ -110,7 +110,7 @@ export class CallEventHandler {
// This one wasn't buffered so just run the event handler for it
// straight away
try {
this.handleCallEvent(event);
await this.handleCallEvent(event);
} catch (e) {
logger.error("Caught exception handling call event", e);
}
Expand Down

0 comments on commit b9e5417

Please sign in to comment.