Commit 80f8317
fix: close WebSocket after commit timeout in both realtime sessions
WebSocket adversarial scenario audit found: when commit() times out
(30s), the Promise was resolved but the WebSocket left open. This
wastes server resources and could cause stale events from being
processed by a future session.
Fixed in both OpenAIRealtimeSession and ParaformerRealtimeSession:
timeout callbacks now call this.close() after resolving.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent ce13df5 commit 80f8317
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
| 233 | + | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
| 242 | + | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
| 437 | + | |
437 | 438 | | |
438 | 439 | | |
439 | 440 | | |
| |||
0 commit comments