Skip to content

Commit 916f457

Browse files
committed
Fix TraceSegmentServiceClient flush to restart report loop after manual flush
1 parent bc6c898 commit 916f457

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/agent/core/remote/TraceSegmentServiceClient.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@ export default class TraceSegmentServiceClient implements BootService, GRPCChann
172172
this.timeout = undefined;
173173
}
174174

175-
return this.buffer.length === 0 ? null : this.reportOnce();
175+
if (this.buffer.length === 0) {
176+
this.scheduleNextReport();
177+
return null;
178+
}
179+
180+
return this.reportOnce().finally(() => this.scheduleNextReport());
176181
}
177182
}

0 commit comments

Comments
 (0)