Commit 4b4e2fb
Guard against non-dict JSON messages in the receive loop
json.loads can return lists, strings, numbers, or null. These
would crash _handle_message which expects a dict. Now emits an
error event and continues instead.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 4cefffe commit 4b4e2fb
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
256 | 263 | | |
257 | 264 | | |
258 | 265 | | |
| |||
0 commit comments