mirror of
https://github.com/nikdoof/hapz2m.git
synced 2026-01-30 20:58:26 +00:00
Previously the message handler spawned a goroutine for each message and hoped for the best, but obviously it didn't work. Z2M often emitted the current (old) state first, before sending out the updated state. Without ordering, the old state might get processed later and overwrote the new, correct state. Message handling is now serialized, but decoupled, using a buffered channel and a separate goroutine for processing.
18 KiB
18 KiB