Skip to content

Read the request response to avoid overlapping requests to collector - #1358

Merged
Matus Tomlein (matus-tomlein) merged 1 commit into
release/4.0.0from
issue/read_full_request_response
Oct 22, 2024
Merged

Read the request response to avoid overlapping requests to collector#1358
Matus Tomlein (matus-tomlein) merged 1 commit into
release/4.0.0from
issue/read_full_request_response

Conversation

@matus-tomlein

Copy link
Copy Markdown
Contributor

Aims to address issue #1355.

This PR adds an await for the response body to be read before continuing with the emitter loop. Previously it was possible that requests overlapped since the emitter could start a new request (for follow up events) before the previous response was fully received. This could have caused problems with the fetch keepalive limitations.

@bundlemon

bundlemon Bot commented Oct 21, 2024

Copy link
Copy Markdown

BundleMon

Files added (6)
Status Path Size Limits
trackers/javascript-tracker/dist/sp.js
+24.28KB 30KB / +10%
libraries/browser-tracker-core/dist/index.mod
ule.js
+23.45KB 25KB / +10%
libraries/tracker-core/dist/index.module.js
+19.21KB 20KB / +10%
trackers/browser-tracker/dist/index.umd.min.j
s
+17.22KB 20KB / +10%
trackers/javascript-tracker/dist/sp.lite.js
+17.15KB 20KB / +10%
trackers/browser-tracker/dist/index.module.js
+3.49KB 5KB / +10%

Total files change +104.79KB 0%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history

@jethron Jethro Nederhof (jethron) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants