Commit 106f6c5
committed
[Personal-WP] Fix broadcast message loop in tab coordinator
Prevent infinite loop where checkForExistingTabs was being called
repeatedly, causing continuous ping messages between BroadcastChannel
instances in the same tab.
Changes:
- Add mutex lock and rate limiting (1s min interval) to checkForExistingTabs
- Fix unstable useCallback dependency in useTabTracking hook1 parent 6c6fac3 commit 106f6c5
File tree
2 files changed
+22
-5
lines changed- packages/playground/personal-wp/src/lib
- hooks
- state/redux
2 files changed
+22
-5
lines changedLines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
58 | | - | |
| 61 | + | |
59 | 62 | | |
60 | | - | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| |||
Lines changed: 17 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| 91 | + | |
| 92 | + | |
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
| |||
168 | 171 | | |
169 | 172 | | |
170 | 173 | | |
| 174 | + | |
| 175 | + | |
171 | 176 | | |
172 | 177 | | |
173 | 178 | | |
| |||
185 | 190 | | |
186 | 191 | | |
187 | 192 | | |
188 | | - | |
| 193 | + | |
189 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
190 | 202 | | |
191 | 203 | | |
192 | 204 | | |
| |||
212 | 224 | | |
213 | 225 | | |
214 | 226 | | |
| 227 | + | |
215 | 228 | | |
216 | | - | |
| 229 | + | |
217 | 230 | | |
218 | 231 | | |
219 | | - | |
| 232 | + | |
220 | 233 | | |
221 | 234 | | |
| 235 | + | |
222 | 236 | | |
223 | 237 | | |
224 | 238 | | |
| |||
0 commit comments