Skip to content

Commit a0c208c

Browse files
committed
fix: lint
1 parent 1dba800 commit a0c208c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/telemetry/telemetry.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,9 @@ export class Telemetry {
184184

185185
if (this.flushing) {
186186
this.eventCache.appendEvents(events ?? []);
187-
process.nextTick(() => { // try again if in the middle of a flush
188-
this.flush();
187+
process.nextTick(async () => {
188+
// try again if in the middle of a flush
189+
await this.flush();
189190
});
190191
return;
191192
}
@@ -220,8 +221,9 @@ export class Telemetry {
220221
`Error sending event to client: ${error instanceof Error ? error.message : String(error)}`
221222
);
222223
this.eventCache.appendEvents(events ?? []);
223-
process.nextTick(() => { // try again
224-
this.flush();
224+
process.nextTick(async () => {
225+
// try again
226+
await this.flush();
225227
});
226228
}
227229

0 commit comments

Comments
 (0)