Commit eadf165
zhansheng.lzs
Fix end_session() to handle server errors immediately
The server currently does not support session.finish event for
qwen3.5-omni-flash-realtime, returning an error instead of
session.finished. Previously end_session() would wait the full
timeout duration (20s) before falling back to ws.close().
Now the method detects server error events immediately and closes
the connection without waiting, reducing wait time from 20s to
<0.1s when the server rejects session.finish.
Related to issue #1401 parent 6475159 commit eadf165
1 file changed
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| |||
350 | 351 | | |
351 | 352 | | |
352 | 353 | | |
| 354 | + | |
353 | 355 | | |
354 | 356 | | |
355 | 357 | | |
| |||
362 | 364 | | |
363 | 365 | | |
364 | 366 | | |
365 | | - | |
| 367 | + | |
366 | 368 | | |
| 369 | + | |
367 | 370 | | |
368 | | - | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
369 | 375 | | |
370 | 376 | | |
371 | 377 | | |
| |||
536 | 542 | | |
537 | 543 | | |
538 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
539 | 553 | | |
540 | 554 | | |
541 | 555 | | |
| |||
0 commit comments