mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-25 10:58:19 +01:00
MessageReceiver: Pause processing of new messages on suspend
This commit is contained in:
@@ -187,6 +187,22 @@ 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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user