Commit d261291
committed
fix(stream): expire stream tokens and order init before the services it patches
Two faults found by reading the live container, not the source.
The s6 oneshot that patches nginx and selkies had no ordering edge to
anything that consumes its work. On the running host selkies and nginx
started at 06:35:13 and init.sh finished writing at 06:35:21, so every
patch landed on disk with no effect on the processes already up: the
stream gate was absent from the live nginx (zero /verify hits, an
unauthenticated GET / answering 200) and both selkies fixes were inert,
which is why the gamepad INFO spam and the climbing EVDEV client count
survived a patch that reported success. init-services now depends on
init-pcsx2-config. The slow networked work moves to a new
init-pcsx2-deps that only svc-broker waits for, so apt and the
patches.zip download cannot delay the stream stack.
Stream tokens now carry an idle TTL, refreshed on every admitted
request, so an abandoned session stops holding the gate open. A re-issue
demotes the previous token instead of dropping it, keeping it valid for
a grace window: relaunching into an open tab meant the browser was still
replaying the old stream_sid while RomM navigated to the new URL, and
every one of those requests 403'd, which the client reports as a dropped
connection and retries in a loop. A query token that outranks a stale
cookie now re-cookies the browser so the tab moves across before the
window closes.
The gate's 403s now name their reason, which reaches stdout through the
existing error choke point, and /status reports the token only while it
is still live rather than handing back a dead one.1 parent a25d0eb commit d261291
11 files changed
Lines changed: 249 additions & 77 deletions
File tree
- root
- etc/s6-overlay/s6-rc.d
- init-pcsx2-config
- init-pcsx2-deps
- dependencies.d
- init-services/dependencies.d
- svc-broker/dependencies.d
- user/contents.d
- root
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
125 | 127 | | |
126 | 128 | | |
127 | 129 | | |
| |||
226 | 228 | | |
227 | 229 | | |
228 | 230 | | |
| 231 | + | |
| 232 | + | |
229 | 233 | | |
230 | 234 | | |
231 | 235 | | |
| |||
238 | 242 | | |
239 | 243 | | |
240 | 244 | | |
| 245 | + | |
| 246 | + | |
241 | 247 | | |
242 | 248 | | |
243 | 249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
3 | 14 | | |
4 | 15 | | |
5 | 16 | | |
| |||
17 | 28 | | |
18 | 29 | | |
19 | 30 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | 31 | | |
62 | 32 | | |
63 | 33 | | |
| |||
Whitespace-only changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
170 | 183 | | |
171 | 184 | | |
172 | 185 | | |
| |||
231 | 244 | | |
232 | 245 | | |
233 | 246 | | |
234 | | - | |
235 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
236 | 255 | | |
237 | 256 | | |
238 | 257 | | |
239 | 258 | | |
240 | 259 | | |
241 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
242 | 266 | | |
| 267 | + | |
243 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
244 | 273 | | |
| 274 | + | |
245 | 275 | | |
246 | 276 | | |
247 | 277 | | |
248 | | - | |
249 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
250 | 285 | | |
251 | | - | |
| 286 | + | |
| 287 | + | |
252 | 288 | | |
253 | 289 | | |
254 | | - | |
255 | | - | |
256 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
257 | 305 | | |
258 | 306 | | |
259 | 307 | | |
260 | 308 | | |
261 | 309 | | |
262 | 310 | | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
263 | 327 | | |
264 | 328 | | |
265 | 329 | | |
| |||
287 | 351 | | |
288 | 352 | | |
289 | 353 | | |
290 | | - | |
| 354 | + | |
291 | 355 | | |
292 | 356 | | |
293 | | - | |
| 357 | + | |
| 358 | + | |
294 | 359 | | |
295 | 360 | | |
296 | 361 | | |
297 | 362 | | |
298 | 363 | | |
299 | 364 | | |
300 | 365 | | |
301 | | - | |
302 | | - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
303 | 369 | | |
304 | | - | |
305 | | - | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
306 | 376 | | |
307 | 377 | | |
308 | 378 | | |
| |||
1760 | 1830 | | |
1761 | 1831 | | |
1762 | 1832 | | |
1763 | | - | |
| 1833 | + | |
1764 | 1834 | | |
1765 | 1835 | | |
1766 | 1836 | | |
1767 | 1837 | | |
1768 | 1838 | | |
1769 | 1839 | | |
1770 | | - | |
| 1840 | + | |
1771 | 1841 | | |
1772 | 1842 | | |
1773 | 1843 | | |
| |||
2156 | 2226 | | |
2157 | 2227 | | |
2158 | 2228 | | |
2159 | | - | |
| 2229 | + | |
2160 | 2230 | | |
2161 | 2231 | | |
2162 | 2232 | | |
| |||
0 commit comments