mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-20 05:17:18 +00:00

We recently sent a PR to handle multiple buffered IPC messages being reported as a single message, confusing `JSON.parse()` in `lib/shared/child-writer/index.js`, by only sending the last message, and ignoring the rest, under the assumption that the loss of some state messages is not critical for the application and the writing process to work property. As @lurch pointed out, however, a buffer set of messages might contain an error object somewhere, and by ignoring all but the last message, we ignore any error that happened in the way. See: https://github.com/resin-io/etcher/issues/898 Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>