Skip to content

bandwidthAbortRequestDuration fixes#78

Open
wiedehopf wants to merge 2 commits intocloudflare:mainfrom
wiedehopf:main
Open

bandwidthAbortRequestDuration fixes#78
wiedehopf wants to merge 2 commits intocloudflare:mainfrom
wiedehopf:main

Conversation

@wiedehopf
Copy link
Copy Markdown

@wiedehopf wiedehopf commented Mar 29, 2026

bandwidthAbortRequestDuration: fix undefined dereference

add check if abortController exists before calling .abort()

this seems to be a race condition and i don't know the codebase well
enough to really understand how it happens.
but there should be no harm not aborting the request when there is no
abortcontroller.

fixes: https://github.com/cloudflare/speedtest/issues/77

bandwidthAbortRequestDuration: fix wrongly throwing error when not aborted

The abortTimeout is only canceled when the request is aborted.
Also cancel it when the measurement is finished.
retries == 0 is when the measurement is started, so when retries is set
back to 0, the measurement is finished, add clearTimeout here.

fixes: https://github.com/cloudflare/speedtest/issues/77

fixes: #77

…orted

The abortTimeout is only canceled when the request is aborted.
Also cancel it when the measurement is finished.
retries == 0 is when the measurement is started, so when retries is set
back to 0, the measurement is finished, add clearTimeout here.

fixes: cloudflare#77
add check if abortController exists before calling .abort()

this seems to be a race condition and i don't know the codebase well
enough to really understand how it happens.
but there should be no harm not aborting the request when there is no
abortcontroller.

fixes: cloudflare#77
@github-actions
Copy link
Copy Markdown
Contributor

Please set a semver versioning label of either major, minor, or patch on this pull request.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bandwidthAbortRequestDuration produces errors without abort

1 participant