Skip to content

fix(core): stop polling timers on restart and disconnect - #363

Merged
bennypowers merged 1 commit into
apollo-elements:mainfrom
dajiaohuang:fix/c1-2501-apollo-elements-polling-lifecycle-20261027
Oct 29, 2026
Merged

bennypowers merged 1 commit into
apollo-elements:mainfrom
dajiaohuang:fix/c1-2501-apollo-elements-polling-lifecycle-20261027

Conversation

@dajiaohuang

Copy link
Copy Markdown
Contributor

Summary

  • Stop the controller-owned polling timer when startPolling() is called again, when stopPolling() is called, and when the host disconnects.
  • Document the timer lifecycle and add a patch changeset.

Related to the historical disconnect-polling report in #192. That report's reproduction used the pollInterval option; this change covers the separate manual startPolling() interval, which survives host disconnection after the controller cleanup refactor.

Validation

  • npm exec -- tsc --noEmit --pretty false -p packages/core/tsconfig.json — passed.
  • ESLint on both changed TypeScript files — no errors; one existing deprecation warning at apollo-query-controller.ts:389.
  • Synthetic probe against the bundled controller source verified timer replacement, explicit stop, and host-disconnect cleanup.
  • The targeted Web Test Runner invocation could not import the test module on native Windows (Failed to resolve module specifier "\ttestschema.ts"), so that browser test did not execute. No full-suite or CI result is claimed.

@changeset-bot

changeset-bot Bot commented Oct 27, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c35a903

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@apollo-elements/core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify

netlify Bot commented Oct 27, 2026

Copy link
Copy Markdown

👷 Deploy request for apollo-elements pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit c35a903

@bennypowers

Copy link
Copy Markdown
Member

Thanks for the PR

@bennypowers
bennypowers merged commit f30a4a3 into apollo-elements:main Oct 29, 2026
1 check failed
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.

2 participants