Skip to content

Commit

Permalink
fix: remove redundant .then() (#1671)
Browse files Browse the repository at this point in the history
Co-authored-by: Megan Potter <[email protected]>
  • Loading branch information
garymathews and feywind committed Jan 23, 2023
1 parent 3dcd0fc commit 108edc3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/subscriber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 108edc3

Please sign in to comment.