Commit 411d5fd
fix(tlon): add timeout to SSE client fetch calls (CWE-400) (#5926)
Add timeout protection to prevent indefinite hangs when Urbit server
becomes unresponsive or network partition occurs.
Changes:
- Add AbortSignal.timeout(30_000) to 7 one-shot fetch calls
- Add AbortController with 60s connection timeout to SSE stream fetch
(clears timeout after headers received to avoid aborting active stream)
Affected methods: sendSubscription, connect, openStream, poke, scry, close
Fixes #5266
Co-authored-by: Claude Opus 4.5 <[email protected]>1 parent 19775ab commit 411d5fd
1 file changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| |||
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
| 134 | + | |
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
| |||
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
| 157 | + | |
155 | 158 | | |
156 | 159 | | |
157 | 160 | | |
| |||
164 | 167 | | |
165 | 168 | | |
166 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
167 | 175 | | |
168 | 176 | | |
169 | 177 | | |
170 | 178 | | |
171 | 179 | | |
172 | 180 | | |
| 181 | + | |
173 | 182 | | |
174 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
175 | 187 | | |
176 | 188 | | |
177 | 189 | | |
| |||
279 | 291 | | |
280 | 292 | | |
281 | 293 | | |
| 294 | + | |
282 | 295 | | |
283 | 296 | | |
284 | 297 | | |
| |||
296 | 309 | | |
297 | 310 | | |
298 | 311 | | |
| 312 | + | |
299 | 313 | | |
300 | 314 | | |
301 | 315 | | |
| |||
364 | 378 | | |
365 | 379 | | |
366 | 380 | | |
| 381 | + | |
367 | 382 | | |
368 | 383 | | |
369 | 384 | | |
370 | 385 | | |
371 | 386 | | |
372 | 387 | | |
373 | 388 | | |
| 389 | + | |
374 | 390 | | |
375 | 391 | | |
376 | 392 | | |
| |||
0 commit comments