Use websocket queue for queueAllCached()

This commit is contained in:
Fedor Indutny 2021-05-24 11:00:53 -07:00 committed by GitHub
parent 05306c2d3d
commit 79a90802c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -284,7 +284,7 @@ class MessageReceiverInner extends EventTarget {
}
// We always process our cache before processing a new websocket message
this.encryptedQueue.add(async () => this.queueAllCached());
this.incomingQueue.add(async () => this.queueAllCached());
this.count = 0;
if (this.hasConnected) {
@ -735,7 +735,7 @@ class MessageReceiverInner extends EventTarget {
if (this.isEmptied) {
this.clearRetryTimeout();
this.retryCachedTimeout = setTimeout(() => {
this.encryptedQueue.add(async () => this.queueAllCached());
this.incomingQueue.add(async () => this.queueAllCached());
}, RETRY_TIMEOUT);
}
}