Add "clean up timer if necessary" utility
This commit is contained in:
parent
c2a65306e2
commit
052a8e65e2
23 changed files with 150 additions and 137 deletions
|
@ -45,6 +45,7 @@ import { dropNull } from '../util/dropNull';
|
|||
import { normalizeUuid } from '../util/normalizeUuid';
|
||||
import { normalizeNumber } from '../util/normalizeNumber';
|
||||
import { parseIntOrThrow } from '../util/parseIntOrThrow';
|
||||
import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary';
|
||||
import { Zone } from '../util/Zone';
|
||||
import { deriveMasterKeyFromGroupV1 } from '../Crypto';
|
||||
import type { DownloadedAttachmentType } from '../types/Attachment';
|
||||
|
@ -756,10 +757,8 @@ export default class MessageReceiver
|
|||
}
|
||||
|
||||
private clearRetryTimeout(): void {
|
||||
if (this.retryCachedTimeout) {
|
||||
clearInterval(this.retryCachedTimeout);
|
||||
this.retryCachedTimeout = undefined;
|
||||
}
|
||||
clearTimeoutIfNecessary(this.retryCachedTimeout);
|
||||
this.retryCachedTimeout = undefined;
|
||||
}
|
||||
|
||||
private maybeScheduleRetryTimeout(): void {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue