remove options on dispose in Member

to ensure callback can't be called anymore, as we don't check
that the member argument is the one currently in GroupCall._members.
This commit is contained in:
Bruno Windels 2022-10-07 10:07:46 +02:00
parent 400df6a4ff
commit 7936863934

View File

@ -98,7 +98,7 @@ export class Member {
constructor(
public member: RoomMember,
private callDeviceMembership: CallDeviceMembership,
private readonly options: Options,
private options: Options,
updateMemberLog: ILogItem
) {
this._renewExpireTimeout(updateMemberLog);
@ -402,6 +402,8 @@ export class Member {
this.connection = undefined;
this.expireTimeout?.dispose();
this.expireTimeout = undefined;
// ensure the emitUpdate callback can't be called anymore
this.options = undefined as any as Options;
}
}