17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 07:29:20 +02:00
Files
Hirek193 314595e8f0 hardware protocol v2: make the hello handshake idempotent
A device which doesn't hear the welcome repeats its greeting. Minting a
fresh session for every repeat left both ends chasing each other's
session ids: the device eventually answered with the id it had been
given, the simulator had already moved on and rejected it as
INVALID_SESSION, the device restarted the handshake, and so on twice a
second for as long as the link was up.

The same greeting arriving on a session which has not been used yet is
now answered with the session it already has, and only a different
device, or one whose session had progressed, gets a new id. Repeated
greetings are counted as handshakes and shown in the debug panel, so the
condition which causes them stays visible instead of flooding the log.
2026-09-17 15:01:58 +00:00
..