File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -303,12 +303,12 @@ export class OrderedQueue extends MessageQueue {
303
303
/**
304
304
* Starts a timeout to publish any pending messages.
305
305
*/
306
- beginNextPublish ( ) : void {
306
+ beginNextPublish ( callback ?: PublishDone ) : void {
307
307
const maxMilliseconds = this . batchOptions . maxMilliseconds ! ;
308
308
const timeWaiting = Date . now ( ) - this . currentBatch . created ;
309
309
const delay = Math . max ( 0 , maxMilliseconds - timeWaiting ) ;
310
310
311
- this . pending = setTimeout ( ( ) => this . publish ( ) , delay ) ;
311
+ this . pending = setTimeout ( ( ) => this . publish ( callback ) , delay ) ;
312
312
}
313
313
/**
314
314
* Creates a new {@link MessageBatch} instance.
@@ -361,7 +361,7 @@ export class OrderedQueue extends MessageQueue {
361
361
this . handlePublishFailure ( err ) ;
362
362
definedCallback ( err ) ;
363
363
} else if ( this . batches . length ) {
364
- this . beginNextPublish ( ) ;
364
+ this . beginNextPublish ( callback ) ;
365
365
} else {
366
366
this . emit ( 'drain' ) ;
367
367
definedCallback ( null ) ;
You can’t perform that action at this time.
0 commit comments