Stop signed key rotation as export process starts

This commit is contained in:
Scott Nonnenberg
2017-11-30 10:10:24 -08:00
parent 00ca91bc9b
commit a246e1a614
2 changed files with 11 additions and 0 deletions

View File

@@ -101,6 +101,8 @@
};
Whisper.events.on('start-shutdown', function() {
Whisper.RotateSignedPreKeyListener.stop();
if (messageReceiver) {
messageReceiver.close().then(function() {
messageReceiver = null;

View File

@@ -59,6 +59,15 @@
setTimeoutForNextRun();
}
});
},
stop: function() {
console.log('Stopping signed prekey rotation');
clearTimeout(timeout);
timeout = null;
},
start: function() {
console.log('Starting signed prekey rotation');
setTimeoutForNextRun();
}
};
}());