Skip to content

Commit

Permalink
Read the request response to avoid overlapping requests to collector (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
matus-tomlein authored Oct 22, 2024
1 parent fc5e39f commit 9e5c68a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libraries/tracker-core/src/emitter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ export function newEmitter({
const payloads = request.getEvents().map((event) => event.getPayload());
try {
const response = await customFetch(fetchRequest);
await response.text(); // wait for the response to be fully read

request.closeRequest(true);

Expand Down

0 comments on commit 9e5c68a

Please sign in to comment.