mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-11-20 11:36:24 +01:00
call points for PeerCall.delay rely on AbortError actually being thrown
+ fix this in one call point where it wasn't the case
This commit is contained in:
parent
167a19a85b
commit
282cba0ff1
@ -771,7 +771,8 @@ export class PeerCall implements IDisposable {
|
|||||||
const {flushCandidatesLog} = this;
|
const {flushCandidatesLog} = this;
|
||||||
// MSC2746 recommends these values (can be quite long when calling because the
|
// MSC2746 recommends these values (can be quite long when calling because the
|
||||||
// callee will need a while to answer the call)
|
// callee will need a while to answer the call)
|
||||||
await this.delay(this.direction === CallDirection.Inbound ? 500 : 2000);
|
try { await this.delay(this.direction === CallDirection.Inbound ? 500 : 2000); }
|
||||||
|
catch (err) { return; }
|
||||||
this.sendCandidateQueue(flushCandidatesLog);
|
this.sendCandidateQueue(flushCandidatesLog);
|
||||||
this.flushCandidatesLog = undefined;
|
this.flushCandidatesLog = undefined;
|
||||||
}
|
}
|
||||||
@ -1100,12 +1101,9 @@ export class PeerCall implements IDisposable {
|
|||||||
const timeout = this.disposables.track(this.options.createTimeout(timeoutMs));
|
const timeout = this.disposables.track(this.options.createTimeout(timeoutMs));
|
||||||
try {
|
try {
|
||||||
await timeout.elapsed();
|
await timeout.elapsed();
|
||||||
} catch (err) {
|
} finally {
|
||||||
if (err.name !== "AbortError") {
|
this.disposables.untrack(timeout);
|
||||||
throw err;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
this.disposables.untrack(timeout);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private sendSignallingMessage(message: SignallingMessage<MCallBase>, log: ILogItem) {
|
private sendSignallingMessage(message: SignallingMessage<MCallBase>, log: ILogItem) {
|
||||||
|
Loading…
Reference in New Issue
Block a user