mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-11 23:04:52 +09:00
The send buffer limit in controller.max_send_buffer_size is set in MiB, but buffered messages were measured with String.length, which counts UTF-16 code units. Messages with non-ASCII text could go over the configured size in bytes before the session was ended. Measure each serialised message with Buffer.byteLength when it is buffered, keep that size with the entry, and subtract the same size when it is acknowledged. The web UI build already provides Buffer through the buffer polyfill. Fixes #1108 Co-authored-by: ColumbusLabs <287001685+ColumbusLabs@users.noreply.github.com>
Common Library for Clusterio
This package contains functionality shared between controller, host, ctl and/or plugins of Clusterio.
See the Clusterio repository for more information on Clusterio.