Commit 03a333c
committed
Fix race condition: purge anonymous ops AFTER queue is loaded
IdentityVerificationService.onModelReplaced (config HYDRATE) could
fire before OperationRepo.loadSavedOperations() finished, causing
removeOperationsWithoutExternalId() to run against an empty queue.
Wrap the HYDRATE handler in suspendifyOnIO + awaitInitialized() so
the purge waits for the queue to be fully populated, following the
same pattern as RecoverFromDroppedLoginBug.1 parent 3f3dd09 commit 03a333c
2 files changed
Lines changed: 17 additions & 14 deletions
File tree
- OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/internal
- config/impl
- operations/impl
Lines changed: 16 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 46 | + | |
| 47 | + | |
49 | 48 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
54 | 59 | | |
55 | | - | |
56 | 60 | | |
57 | | - | |
| 61 | + | |
58 | 62 | | |
59 | | - | |
| 63 | + | |
| 64 | + | |
60 | 65 | | |
61 | 66 | | |
62 | 67 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
555 | 555 | | |
556 | 556 | | |
557 | 557 | | |
558 | | - | |
559 | | - | |
560 | | - | |
| 558 | + | |
561 | 559 | | |
562 | 560 | | |
563 | 561 | | |
| |||
0 commit comments