Whenever adding something to a queue, include a timeout
No more wedged queues! FREEBIE
This commit is contained in:
parent
cc2c3edaa6
commit
9db0a58260
10 changed files with 243 additions and 27 deletions
|
@ -411,7 +411,10 @@
|
|||
|
||||
queueJob: function(callback) {
|
||||
var previous = this.pending || Promise.resolve();
|
||||
var current = this.pending = previous.then(callback, callback);
|
||||
|
||||
var taskWithTimeout = textsecure.createTaskWithTimeout(callback, 'conversation ' + this.id);
|
||||
|
||||
var current = this.pending = previous.then(taskWithTimeout, taskWithTimeout);
|
||||
|
||||
current.then(function() {
|
||||
if (this.pending === current) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue