Commit 118e400
authored
Fix HTTP Race Condition (#372)
* Fix HTTP Concurrency
• Fixes a relatively rare issue that would be encountered if the SDK attempted to make concurrent HTTP requests during an invalid situation, such as after the user has revoked GDPR consent
• The SDK was previously using a semaphore to wait for a batch of HTTP requests to finish.
• However, if the SDK immediately fails the request (synchronously), the request would fail before the SDK started waiting for the request to finish, resulting in a permanently blocked queue.
• Switched to using a dispatch_group which would handle this situation better. Also added a missing GDPR consent check to the onFocus methods
* Remove Debug Statement
• Removes a debug statement from the previous commit1 parent dbf373e commit 118e400
File tree
2 files changed
+11
-6
lines changed- iOS_SDK/OneSignalSDK/Source
2 files changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
83 | 86 | | |
84 | 87 | | |
85 | | - | |
| 88 | + | |
86 | 89 | | |
87 | 90 | | |
88 | | - | |
| 91 | + | |
89 | 92 | | |
90 | 93 | | |
91 | 94 | | |
92 | | - | |
93 | | - | |
94 | | - | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
82 | 86 | | |
83 | 87 | | |
84 | 88 | | |
| |||
0 commit comments