Revert "MessageReceiver: Pause processing of new messages on suspend"

This reverts commit d74424a3b8.
This commit is contained in:
Fedor Indutny 2022-01-24 15:50:32 -08:00 committed by GitHub
parent a2a9500728
commit 3c836908aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 19 deletions

View file

@ -1564,15 +1564,13 @@ export async function startApp(): Promise<void> {
window.Whisper.events.on('powerMonitorSuspend', () => {
log.info('powerMonitor: suspend');
messageReceiver?.pause();
suspendTasksWithTimeout();
});
window.Whisper.events.on('powerMonitorResume', () => {
log.info('powerMonitor: resume');
messageReceiver?.resume();
resumeTasksWithTimeout();
server?.checkSockets();
resumeTasksWithTimeout();
});
window.Whisper.events.on('powerMonitorLockScreen', () => {

View file

@ -187,22 +187,6 @@ export default class MessageReceiver
private stoppingProcessing?: boolean;
pause(): void {
this.incomingQueue.pause();
this.encryptedQueue.pause();
this.decryptedQueue.pause();
this.appQueue.pause();
log.info('MessageReceiver: Paused');
}
resume(): void {
this.appQueue.start();
this.decryptedQueue.start();
this.encryptedQueue.start();
this.incomingQueue.start();
log.info('MessageReceiver: Resumed');
}
constructor({ server, storage, serverTrustRoot }: MessageReceiverOptions) {
super();