diff --git a/ts/SignalProtocolStore.ts b/ts/SignalProtocolStore.ts index cb19b9073d..7b4a668f68 100644 --- a/ts/SignalProtocolStore.ts +++ b/ts/SignalProtocolStore.ts @@ -249,8 +249,6 @@ export class SignalProtocolStore extends EventEmitter { sessionQueues = new Map(); - sessionQueueJobCounter = 0; - readonly #identityQueues = new Map(); #currentZone?: Zone; #currentZoneDepth = 0; @@ -991,29 +989,13 @@ export class SignalProtocolStore extends EventEmitter { async enqueueSessionJob( qualifiedAddress: QualifiedAddress, - name: string, task: () => Promise, zone: Zone = GLOBAL_ZONE ): Promise { - this.sessionQueueJobCounter += 1; - const id = this.sessionQueueJobCounter; - - const waitStart = Date.now(); - return this.withZone(zone, 'enqueueSessionJob', async () => { const queue = this.#_getSessionQueue(qualifiedAddress); - const waitTime = Date.now() - waitStart; - log.info( - `enqueueSessionJob(${id}): queuing task ${name}, waited ${waitTime}ms` - ); - const queueStart = Date.now(); - return queue.add(() => { - const queueTime = Date.now() - queueStart; - log.info( - `enqueueSessionJob(${id}): running task ${name}, waited ${queueTime}ms` - ); return task(); }); }); @@ -1593,7 +1575,6 @@ export class SignalProtocolStore extends EventEmitter { await this.enqueueSessionJob( addr, - `_archiveSession(${addr.toString()})`, async () => { const item = entry.hydrated ? entry.item : hydrateSession(entry.fromDB); diff --git a/ts/textsecure/MessageReceiver.ts b/ts/textsecure/MessageReceiver.ts index 80e999df3c..a7a10c623d 100644 --- a/ts/textsecure/MessageReceiver.ts +++ b/ts/textsecure/MessageReceiver.ts @@ -1798,7 +1798,6 @@ export default class MessageReceiver ); const unsealedPlaintext = await this.#storage.protocol.enqueueSessionJob( address, - `sealedSenderDecryptMessage(${address.toString()})`, () => sealedSenderDecryptMessage( Buffer.from(ciphertext), @@ -1893,7 +1892,6 @@ export default class MessageReceiver const plaintext = await this.#storage.protocol.enqueueSessionJob( address, - `signalDecrypt(${address.toString()})`, async () => this.#unpad( await signalDecrypt( @@ -1925,7 +1923,6 @@ export default class MessageReceiver const plaintext = await this.#storage.protocol.enqueueSessionJob( address, - `signalDecryptPreKey(${address.toString()})`, async () => this.#unpad( await signalDecryptPreKey( diff --git a/ts/textsecure/OutgoingMessage.ts b/ts/textsecure/OutgoingMessage.ts index aadd8851ff..766168b16d 100644 --- a/ts/textsecure/OutgoingMessage.ts +++ b/ts/textsecure/OutgoingMessage.ts @@ -445,7 +445,6 @@ export default class OutgoingMessage { return window.textsecure.storage.protocol.enqueueSessionJob( address, - `doSendMessage(${address.toString()}, ${this.timestamp})`, async () => { const protocolAddress = ProtocolAddress.new( serviceId, @@ -641,7 +640,7 @@ export default class OutgoingMessage { ) { newError = new OutgoingIdentityKeyError(serviceId, error); log.error( - 'Got "key changed" error from encrypt - no identityKey for application layer', + 'UntrustedIdentityKeyError from decrypt!', serviceId, deviceIds ); diff --git a/ts/textsecure/getKeysForServiceId.ts b/ts/textsecure/getKeysForServiceId.ts index 48121b4bac..2ef4919683 100644 --- a/ts/textsecure/getKeysForServiceId.ts +++ b/ts/textsecure/getKeysForServiceId.ts @@ -183,7 +183,6 @@ async function handleServerKeys( try { await window.textsecure.storage.protocol.enqueueSessionJob( address, - `handleServerKeys(${serviceId})`, () => processPreKeyBundle( preKeyBundle,