You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously the DeviceBus._read_message function had bugs with
consecutive empty messages (should rarely happen, but should still be
handled appropriately) or with two delimeters at the end of a buffer
(happens when one message ends almost at the end of the buffer and
another begins at the last byte of the buffer, which should be rare but
is more common with subscriptions). This refactor should be more
robust, and I believe also faster but I haven't benchmarked it.
In the process, make the entire function work on bytearrays instead of
converting to string early; this shouldn't make a difference with the
JSON being all ASCII, but can if the JSON is ever serialized in UTF-8
instead of using escape sequences.
0 commit comments