Commit bd0de3a
fix(audience-session): reset starts a new session
Prior Reset cleared userId and purged the queue but kept the old
Session running. Subsequent Track events carried the old sessionId
with a new anonymousId — a confusing "session straddles two users"
wire state.
Match Web SDK reset() behaviour:
- Dispose old session (session_end is enqueued then wiped by PurgeAll,
matching Web SDK's silent teardown).
- Reset identity on disk (next GetOrCreate mints a fresh anonymousId).
- Mint a new Session when consent allows tracking; fire session_start
via Start() outside _initLock.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 736b453 commit bd0de3a
1 file changed
Lines changed: 29 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
254 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
255 | 257 | | |
256 | 258 | | |
257 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
258 | 266 | | |
259 | | - | |
260 | | - | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
261 | 271 | | |
262 | | - | |
263 | | - | |
264 | | - | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
265 | 286 | | |
266 | 287 | | |
267 | 288 | | |
| |||
0 commit comments