Commit 3061fd4
committed
feat(MonitorScope): add refresh() for force-resubscribe after external write
After an embedded bridge writes events from a different access token,
the user's primary connection's socket may miss them (the bridge also
creates streams the socket didn't have at attach time). Without an
external trigger the new events don't surface until the next visibility-
change cycle.
refresh() tears down the current Monitor and re-attaches with the
latest maxModified. Re-attach catches up via events.get(modifiedSince=…)
AND re-subscribes the socket on the now-current stream tree, so any
bridge-created stream enters live scope.
No-op when stopped or paused; safe to call repeatedly from
hds-webapp's hds-bridge-done handler.1 parent 9e367d1 commit 3061fd4
1 file changed
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
209 | 234 | | |
210 | 235 | | |
211 | 236 | | |
| |||
0 commit comments