From 108edc3cd2d3d512e2a9777a68541dae1f6aba23 Mon Sep 17 00:00:00 2001 From: Gary Mathews Date: Mon, 23 Jan 2023 12:52:52 -0800 Subject: [PATCH] fix: remove redundant .then() (#1671) Co-authored-by: Megan Potter <57276408+feywind@users.noreply.github.com> --- src/subscriber.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/subscriber.ts b/src/subscriber.ts index 2011aad63..9ee2e29f6 100644 --- a/src/subscriber.ts +++ b/src/subscriber.ts @@ -526,10 +526,9 @@ export class Subscriber extends EventEmitter { const ackTimeSeconds = (Date.now() - message.received) / 1000; this.updateAckDeadline(ackTimeSeconds); - // Ignore this in this version of the method (but hook then/catch + // Ignore this in this version of the method (but hook catch // to avoid unhandled exceptions). const resultPromise = this._acks.add(message); - resultPromise.then(() => {}); resultPromise.catch(() => {}); await this._acks.onFlush(); @@ -606,7 +605,6 @@ export class Subscriber extends EventEmitter { const startTime = Date.now(); const responsePromise = this._modAcks.add(message, deadline); - responsePromise.then(() => {}); responsePromise.catch(() => {}); await this._modAcks.onFlush();