Skip to content

fix: drop events tracked after close() - #97

Merged
Zaimwa9 merged 1 commit into
mainfrom
fix/no-events-after-close
Oct 6, 2026
Merged

Zaimwa9 merged 1 commit into
mainfrom
fix/no-events-after-close

Conversation

@Zaimwa9

@Zaimwa9 Zaimwa9 commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Follow-up to #94. close() cancels the flush timer and flushes once, but the EventProcessor stayed live, so trackEvent, trackExposureEvent and getExperimentFlag called after close() kept buffering events that nothing would ever send. The processor now marks itself stopped: later events are logged and dropped, while the teardown flush and an explicit flushEvents() still complete.

How did you test this code?

flutter analyze clean, flutter test 165 passing. New cases: events tracked after close() are dropped for all three entry points; the buffer pending at close() is still posted.

@Zaimwa9
Zaimwa9 requested a review from a team as a code owner October 5, 2026 09:38
@Zaimwa9
Zaimwa9 requested review from talissoncosta and removed request for a team October 5, 2026 09:38
@Zaimwa9
Zaimwa9 merged commit b8af810 into main Oct 6, 2026
4 checks passed
@Zaimwa9
Zaimwa9 deleted the fix/no-events-after-close branch October 6, 2026 06:11
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