Skip to content

Fixes handling of a split frame message#618

Draft
lunswor wants to merge 1 commit into
betcode-org:masterfrom
lunswor:fix-stream-split-frame
Draft

Fixes handling of a split frame message#618
lunswor wants to merge 1 commit into
betcode-org:masterfrom
lunswor:fix-stream-split-frame

Conversation

@lunswor

@lunswor lunswor commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Fixes UnicodeDecodeError when receiving messages split across reads, seen occasionally on the cricket stream. Happens when a multi byte character lands at the buffer size split.

For example, a multi-byte character such as an em dash

frame: {"a":"b—c"}\r\n
recv 1:  b'{"a":"b\xe2'
recv 2: b'\x80\x94c"}\r\n'

Currently untested, I still need to test against the socket.

@liampauling

Copy link
Copy Markdown
Member

I had been wondering why this happened for a few years now 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants